Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_SCENE_GEOMETRY_SUB_DIV_H_
00014 #define _FBXSDK_SCENE_GEOMETRY_SUB_DIV_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/math/fbxvector4.h>
00019 #include <fbxsdk/core/math/fbxvector2.h>
00020 #include <fbxsdk/core/base/fbxarray.h>
00021 #include <fbxsdk/scene/geometry/fbxgeometry.h>
00022
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024
00025 class FbxMesh;
00026 class FbxManager;
00027
00029
00030
00031
00033 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00034
00035 class FBXSDK_DLL FbxSubDiv : public FbxGeometry
00036 {
00037 FBXSDK_OBJECT_DECLARE(FbxSubDiv, FbxGeometry);
00038
00039 public:
00040 enum EScheme
00041 {
00042 eCatmullClark,
00043 eDooCSabin,
00044 eLoop,
00045 eLinear,
00046 };
00047
00048 enum ETesselationPattern
00049 {
00050 eOddFractional,
00051 eEvenFractional,
00052 eInteger,
00053 ePower2,
00054 };
00055
00056 enum EDisplaySmoothness
00057 {
00058 eHull,
00059 eRough,
00060 eMedium,
00061 eFine,
00062 };
00063
00069 void InitSubdivLevel(int pLevelCount,
00070 EScheme pScheme = eCatmullClark,
00071 ETesselationPattern pPattern = ePower2);
00072
00073 FbxSubDiv(FbxManager& pManager, char const* pName);
00074
00075 virtual void Destruct(bool pRecursive, bool pDependents);
00076
00077 virtual FbxNodeAttribute::EType GetAttributeType() const;
00078
00079
00080
00081 static const int MAX_SUBDIV_LEVEL = 16;
00082
00083
00084 FbxArray<FbxMesh*> mSubDivLevel;
00085
00086
00087 FbxMesh* GetBaseMesh() const;
00088
00089
00090 FbxMesh* GetFinestMesh() const;
00091
00092
00093 bool SetFinestMesh(FbxMesh* pMesh);
00094
00095
00096 bool SetBaseMesh(FbxMesh* pMesh);
00097
00098
00099 FbxMesh* GetMesh(int pLevel) const;
00100
00106 void SetSubdivLevelMesh(int pLevel, FbxMesh* pMesh);
00107
00108 int GetLevelCount() const;
00109 void SetLevelCount(int pLevelCount);
00110
00111 int GetCurrentLevel() const;
00112 void SetCurrentLevel(int pCurrentLevel);
00113
00114 FbxMesh* GetCurrentMesh() const;
00115
00116 FbxSubDiv::EScheme GetSubdivScheme() const;
00117
00118 FbxSubDiv::ETesselationPattern GetTessPattern() const;
00119
00120 void SetSubdivScheme(FbxSubDiv::EScheme pScheme);
00121
00122 void SetTessPattern(FbxSubDiv::ETesselationPattern pPattern);
00123
00124 FbxSubDiv::EDisplaySmoothness GetDisplaySmoothness() const;
00125
00126 void SetDisplaySmoothness(FbxSubDiv::EDisplaySmoothness pSmoothness);
00127
00128 private:
00129
00130
00131 FbxMesh* mBaseMesh;
00132
00133
00134 FbxMesh* mFinestMesh;
00135
00136
00137 int mCurrLevel;
00138
00139
00140 int mLevelCount;
00141
00142
00143 EScheme mScheme;
00144
00145
00146 ETesselationPattern mPattern;
00147
00148
00149 EDisplaySmoothness mSmoothness;
00150 };
00151
00152 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00153
00154 #include <fbxsdk/fbxsdk_nsend.h>
00155
00156 #endif