Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRY_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRY_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <fbxfilesdk/fbxfilesdk_def.h>
00042
00043 #include <fbxfilesdk/kfbxplugins/kfbxgeometrybase.h>
00044 #include <fbxfilesdk/kfbxplugins/kfbxdeformer.h>
00045 #include <fbxfilesdk/kfbxplugins/kfbxshape.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxblendshape.h>
00047 #include <fbxfilesdk/kfbxplugins/kfbxblendshapechannel.h>
00048
00049 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00050 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00051
00052 #include <fbxfilesdk/kfbxmath/kfbxxmatrix.h>
00053 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00054
00055 class KFbxGeometryWeightedMap;
00056 class KFbxNode;
00057 class KFbxShape;
00058 class KFbxTexture;
00059 class KFbxSdkManager;
00060 class KFbxVector4;
00061 class KFbxAnimCurve;
00062 class KFbxAnimLayer;
00063 class KFbxScene;
00064 class KFbxCluster;
00065 typedef class KFbxCluster KFbxLink;
00066
00083 class KFBX_DLL KFbxGeometry : public KFbxGeometryBase
00084 {
00085 KFBXOBJECT_DECLARE(KFbxGeometry,KFbxGeometryBase);
00086
00087 public:
00094 virtual EAttributeType GetAttributeType() const;
00095
00100
00106 int AddDeformer(KFbxDeformer* pDeformer);
00107
00113 KFbxDeformer* RemoveDeformer(int pIndex);
00114
00118 int GetDeformerCount() const;
00119
00125 KFbxDeformer* GetDeformer(int pIndex) const;
00126
00131 int GetDeformerCount(KFbxDeformer::EDeformerType pType) const;
00132
00139 KFbxDeformer* GetDeformer(int pIndex, KFbxDeformer::EDeformerType pType) const;
00140
00142
00147
00151 KFbxGeometryWeightedMap* GetSourceGeometryWeightedMap();
00152
00156 int GetDestinationGeometryWeightedMapCount() const;
00157
00162 KFbxGeometryWeightedMap* GetDestinationGeometryWeightedMap(int pIndex);
00163
00165
00194 K_DEPRECATED virtual int AddShape(KFbxShape* pShape, char const* pShapeName);
00195
00252 K_DEPRECATED virtual KFbxShape* GetShape(int pIndex);
00253
00260 K_DEPRECATED virtual KFbxShape const* GetShape(int pIndex) const;
00261
00268 K_DEPRECATED virtual char const* GetShapeName(int pIndex) const;
00269
00283 K_DEPRECATED virtual KFbxAnimCurve* GetShapeChannel(char const* pShapeName, KFbxAnimLayer* pLayer, bool pCreateAsNeeded = false);
00284
00292 K_DEPRECATED virtual KFCurve* GetShapeChannel(int pIndex, bool pCreateAsNeeded=false, char const* pTakeName = NULL);
00293
00307 K_DEPRECATED virtual KFbxAnimCurve* GetShapeChannel(int pIndex, KFbxAnimLayer* pLayer, bool pCreateAsNeeded = false);
00308
00310
00315
00323 bool AddShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, KFbxShape* pShape, double pPercent = 100);
00324
00329 void ClearShape();
00330
00334 int GetShapeCount() const;
00335
00341 int GetShapeCount(int pBlendShapeIndex, int pBlendShapeChannelIndex) const;
00342
00350 KFbxShape* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex);
00351
00359 KFbxShape const* GetShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, int pShapeIndex) const;
00360
00374 KFbxAnimCurve* GetShapeChannel(int pBlendShapeIndex, int pBlendShapeChannelIndex, KFbxAnimLayer* pLayer, bool pCreateAsNeeded = false);
00376
00383 typedef enum
00384 {
00385 eRAW,
00386 eLOW_NO_NORMALS,
00387 eLOW,
00388 eHIGH_NO_NORMALS,
00389 eHIGH
00390 } ESurfaceMode;
00391
00399
00404 KFbxXMatrix& GetPivot(KFbxXMatrix& pXMatrix) const;
00405
00409 void SetPivot(KFbxXMatrix& pXMatrix);
00410
00413 void ApplyPivot();
00414
00416
00424
00432 K_DEPRECATED void SetDefaultShape(int pIndex, double pPercent);
00433
00441 K_DEPRECATED void SetDefaultShape(char const* pShapeName, double pPercent);
00442
00449 K_DEPRECATED const double GetDefaultShape(int pIndex) const;
00450
00457 K_DEPRECATED const double GetDefaultShape(char const* pShapeName) const;
00458
00460
00467
00476 void SetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex, double pPercent);
00477
00486 void SetDefaultShape(KFbxBlendShapeChannel* pBlendShapeChannel, double pPercent);
00487
00495 double GetDefaultShape(int pBlendShapeIndex, int pBlendShapeChannelIndex) const;
00496
00504 double GetDefaultShape(KFbxBlendShapeChannel* pBlendShapeChannel) const;
00505
00507
00512
00516 KError& GetError ();
00517
00520 typedef enum
00521 {
00522 eINDEX_OUT_OF_RANGE,
00523 eNULL_PARAMETER,
00524 eSHAPE_ALREADY_ADDED,
00525 eSHAPE_INVALID_NAME,
00526 eSHAPE_NAME_CLASH,
00527 eSHAPE_NO_CURVE_FOUND,
00528 eUNKNOWN_ERROR,
00529 eERROR_COUNT
00530 } EError;
00531
00535 EError GetLastErrorID() const;
00536
00540 const char* GetLastErrorString() const;
00541
00543
00545
00546
00547
00548
00549
00550
00552 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00553
00554 virtual KFbxObject& Copy(const KFbxObject& pObject);
00555
00556 protected:
00557 KFbxGeometry(KFbxSdkManager& pManager, char const* pName);
00558 virtual void Destruct(bool pRecursive, bool pDependents);
00559
00560 virtual void SetDocument(KFbxDocument* pDocument);
00561
00562 public:
00564 void CleanShapeChannels(KFbxAnimLayer* pAnimLayer);
00566 void CleanShapeChannel(KFbxAnimLayer* pAnimLayer, int pShapeIndex);
00567
00568 void CreateShapeChannelProperties(KString& pShapeName);
00569
00570 protected:
00571
00572 KString CreateShapeChannelName(int pShapeIndex);
00573
00574
00575 KString CreateShapeChannelName(KString pShapeName);
00576
00577 public:
00578 void ConvertShapeNamesToV5Format(KString pTakeNodeName);
00579 void ConvertShapeNamesToV5Format(KString pTakeNodeName, int pShapeIndex);
00580 void RevertShapeNamesToV6Format(KString pTakeNodeName);
00581 void RevertShapeNamesToV6Format(KString pTakeNodeName, int pShapeIndex);
00582 void ClearTemporaryShapeNames();
00583
00584 protected:
00585 void CopyDeformers(KFbxGeometry const* pGeometry);
00586 void CopyShapes(KFbxGeometry const* pGeometry);
00587
00588 void CopyPivot(KFbxGeometry const* pSource);
00589
00590
00591 KArrayTemplate<KString*> mShapeNameArrayV6;
00592 KArrayTemplate<KString*> mShapeNameArrayV5;
00593 KArrayTemplate<KString*> mShapeChannelNameArrayV5;
00594
00595 KFbxXMatrix* mPivot;
00596
00597
00598 mutable KError mError;
00599
00600 friend class KFbxScene;
00601
00602 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00603
00604 };
00605
00606 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00607
00608 #endif // FBXFILESDK_KFBXPLUGINS_KFBXGEOMETRY_H
00609