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/base/fbxarray.h>
00019 #include <fbxsdk/scene/geometry/fbxgeometry.h>
00020
00021 #include <fbxsdk/fbxsdk_nsbegin.h>
00022
00023 class FbxMesh;
00024
00025
00026
00027
00028 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00029
00030 class FBXSDK_DLL FbxSubDiv : public FbxGeometry
00031 {
00032 FBXSDK_OBJECT_DECLARE(FbxSubDiv, FbxGeometry);
00033
00034 public:
00035 enum EScheme
00036 {
00037 eCatmullClark,
00038 eDooCSabin,
00039 eLoop,
00040 eLinear,
00041 };
00042
00043 enum ETesselationPattern
00044 {
00045 eOddFractional,
00046 eEvenFractional,
00047 eInteger,
00048 ePower2,
00049 };
00050
00051 enum EDisplaySmoothness
00052 {
00053 eHull,
00054 eRough,
00055 eMedium,
00056 eFine,
00057 };
00058
00064 void InitSubdivLevel(int pLevelCount,
00065 EScheme pScheme = eCatmullClark,
00066 ETesselationPattern pPattern = ePower2);
00067
00068 virtual FbxNodeAttribute::EType GetAttributeType() const;
00069
00070
00071
00072 static const int MAX_SUBDIV_LEVEL = 16;
00073
00074
00075 FbxArray<FbxMesh*> mSubDivLevel;
00076
00077
00078 FbxMesh* GetBaseMesh() const;
00079
00080
00081 FbxMesh* GetFinestMesh() const;
00082
00083
00084 bool SetFinestMesh(FbxMesh* pMesh);
00085
00086
00087 bool SetBaseMesh(FbxMesh* pMesh);
00088
00089
00090 FbxMesh* GetMesh(int pLevel) const;
00091
00097 void SetSubdivLevelMesh(int pLevel, FbxMesh* pMesh);
00098
00099 int GetLevelCount() const;
00100 void SetLevelCount(int pLevelCount);
00101
00102 int GetCurrentLevel() const;
00103 void SetCurrentLevel(int pCurrentLevel);
00104
00105 FbxMesh* GetCurrentMesh() const;
00106
00107 FbxSubDiv::EScheme GetSubdivScheme() const;
00108
00109 FbxSubDiv::ETesselationPattern GetTessPattern() const;
00110
00111 void SetSubdivScheme(FbxSubDiv::EScheme pScheme);
00112
00113 void SetTessPattern(FbxSubDiv::ETesselationPattern pPattern);
00114
00115 FbxSubDiv::EDisplaySmoothness GetDisplaySmoothness() const;
00116
00117 void SetDisplaySmoothness(FbxSubDiv::EDisplaySmoothness pSmoothness);
00118
00119 private:
00120
00121
00122 FbxMesh* mBaseMesh;
00123
00124
00125 FbxMesh* mFinestMesh;
00126
00127
00128 int mCurrLevel;
00129
00130
00131 int mLevelCount;
00132
00133
00134 EScheme mScheme;
00135
00136
00137 ETesselationPattern mPattern;
00138
00139
00140 EDisplaySmoothness mSmoothness;
00141 };
00142
00143 #endif
00144
00145 #include <fbxsdk/fbxsdk_nsend.h>
00146
00147 #endif