Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_SCENE_GEOMETRY_H_
00014 #define _FBXSDK_SCENE_GEOMETRY_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/scene/geometry/fbxgeometrybase.h>
00019 #include <fbxsdk/scene/geometry/fbxdeformer.h>
00020 #include <fbxsdk/scene/geometry/fbxshape.h>
00021 #include <fbxsdk/scene/geometry/fbxblendshape.h>
00022 #include <fbxsdk/scene/geometry/fbxblendshapechannel.h>
00023
00024 #include <fbxsdk/fbxsdk_nsbegin.h>
00025
00026 class FbxStatus;
00027 class FbxGeometryWeightedMap;
00028
00045 class FBXSDK_DLL FbxGeometry : public FbxGeometryBase
00046 {
00047 FBXSDK_OBJECT_DECLARE(FbxGeometry,FbxGeometryBase);
00048
00049 public:
00056 virtual FbxNodeAttribute::EType GetAttributeType() const;
00057
00062
00068 int AddDeformer(FbxDeformer* pDeformer);
00069
00075 FbxDeformer* RemoveDeformer(int pIndex, FbxStatus* pStatus = NULL);
00076
00080 int GetDeformerCount() const;
00081
00087 FbxDeformer* GetDeformer(int pIndex, FbxStatus* pStatus = NULL) const;
00088
00093 int GetDeformerCount(FbxDeformer::EDeformerType pType) const;
00094
00101 FbxDeformer* GetDeformer(int pIndex, FbxDeformer::EDeformerType pType, FbxStatus* pStatus = NULL) const;
00102
00104
00109
00113 FbxGeometryWeightedMap* GetSourceGeometryWeightedMap();
00114
00118 int GetDestinationGeometryWeightedMapCount() const;
00119
00124 FbxGeometryWeightedMap* GetDestinationGeometryWeightedMap(int pIndex);
00125
00127
00132
00141 bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxShape* pShape, double pPercent = 100, FbxStatus* pStatus = NULL);
00142
00147 void ClearShape();
00148
00152 int GetShapeCount() const;
00153
00160 int GetShapeCount(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxStatus* pStatus = NULL) const;
00161
00169 FbxShape* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus* pStatus = NULL);
00170
00178 const FbxShape* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex, FbxStatus* pStatus = NULL) const;
00179
00191 FbxAnimCurve* GetShapeChannel(int pBlendShapeIndex, int pBlendShapeChannelIndex, FbxAnimLayer* pLayer, bool pCreateAsNeeded = false, FbxStatus* pStatus = NULL);
00193
00200 enum ESurfaceMode
00201 {
00202 eRaw,
00203 eLowNoNormals,
00204 eLow,
00205 eHighNoNormals,
00206 eHigh
00207 };
00208
00216
00221 FbxAMatrix& GetPivot(FbxAMatrix& pXMatrix) const;
00222
00226 void SetPivot(FbxAMatrix& pXMatrix);
00227
00230 void ApplyPivot();
00231
00233
00240
00249 void SetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, double pPercent);
00250
00259 void SetDefaultShape(FbxBlendShapeChannel* pBlendShapeChannel, double pPercent);
00260
00268 double GetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex) const;
00269
00277 double GetDefaultShape(FbxBlendShapeChannel* pBlendShapeChannel) const;
00278
00280
00281
00282
00283
00284 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00285 virtual FbxObject& Copy(const FbxObject& pObject);
00286
00287 void CleanShapeChannels(FbxAnimLayer* pAnimLayer);
00288 void CleanShapeChannel(FbxAnimLayer* pAnimLayer, int pShapeIndex);
00289 void CreateShapeChannelProperties(FbxString& pShapeName);
00290 void ConvertShapeNamesToV5Format(FbxString pTakeNodeName);
00291 void ConvertShapeNamesToV5Format(FbxString pTakeNodeName, int pShapeIndex);
00292 void RevertShapeNamesToV6Format(FbxString pTakeNodeName);
00293 void RevertShapeNamesToV6Format(FbxString pTakeNodeName, int pShapeIndex);
00294 void ClearTemporaryShapeNames();
00295
00296 protected:
00297 virtual void Construct(const FbxGeometry* pFrom);
00298 virtual void Destruct(bool pRecursive);
00299 virtual void SetDocument(FbxDocument* pDocument);
00300
00301 FbxString CreateShapeChannelName(int pShapeIndex);
00302 FbxString CreateShapeChannelName(FbxString pShapeName);
00303
00304 void CopyDeformers(const FbxGeometry* pGeometry);
00305 void CopyPivot(const FbxGeometry* pSource);
00306
00307
00308 FbxArray<FbxString*> mShapeNameArrayV6;
00309 FbxArray<FbxString*> mShapeNameArrayV5;
00310 FbxArray<FbxString*> mShapeChannelNameArrayV5;
00311
00312 FbxAMatrix* mPivot;
00313
00314 #endif
00315 };
00316
00317 #include <fbxsdk/fbxsdk_nsend.h>
00318
00319 #endif