mgcbezierpatchg.h
来自「《3D游戏引擎设计》的源码」· C头文件 代码 · 共 66 行
H
66 行
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000, All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement. The various license agreements may be found at
// the Magic Software web site. This file is subject to the license
//
// FREE SOURCE CODE
// http://www.magic-software.com/License/free.pdf
#ifndef MGCBEZIERPATCHG_H
#define MGCBEZIERPATCHG_H
#include "MgcParametricSurface.h"
class MgcVector3;
class MgcBezierPatchG : public MgcParametricSurface
{
public:
// abstract base class for specific type and degree patches
virtual ~MgcBezierPatchG ();
// patch data
unsigned int GetDegree () const;
unsigned int GetCtrlQuantity () const;
MgcVector3* GetCtrlPoints ();
// tessellation data
unsigned int GetVertexQuantity () const;
MgcVector3* GetVertices ();
MgcVector3* GetNormals ();
unsigned int GetTriangleQuantity () const;
const unsigned int* GetConnectivity () const;
// tessellation by recursive subdivision
virtual void Tessellate (unsigned int uiLevel, bool bWantNormals) = 0;
protected:
// Construction. MgcBezierPatchG accepts responsibility for deleting
// the input arrays.
MgcBezierPatchG (unsigned int uiDegree, unsigned int uiCtrlQuantity,
MgcVector3* akCtrlPoint);
// tessellation
virtual void Initialize (unsigned int uiLevel, bool bWantNormals) = 0;
// patch data
unsigned int m_uiDegree;
unsigned int m_uiCtrlQuantity;
MgcVector3* m_akCtrlPoint;
// tessellation data
unsigned int m_uiVertexQuantity;
MgcVector3* m_akVertex;
MgcVector3* m_akNormal;
unsigned int m_uiTriangleQuantity;
unsigned int* m_auiConnect;
};
#include "MgcBezierPatchG.inl"
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?