00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCLUSTER_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCLUSTER_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
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044
00045 #include <fbxfilesdk/kfbxplugins/kfbxsubdeformer.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h>
00047 #include <fbxfilesdk/kfbxmath/kfbxmatrix.h>
00048
00049 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00050
00051 #include <fbxfilesdk/components/kbaselib/kbaselib_forward.h>
00052
00053 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00054
00055 class KFbxSdkManager;
00056 class KFbxNode;
00057 class KFbxCluster_internal;
00058
00063 class KFBX_DLL KFbxCluster : public KFbxSubDeformer
00064 {
00065 KFBXOBJECT_DECLARE(KFbxCluster,KFbxSubDeformer);
00066 public:
00070 ESubDeformerType GetSubDeformerType() {return eCLUSTER; };
00071
00072
00080 void Reset();
00081
00104 typedef enum
00105 {
00106 eNORMALIZE,
00107 eADDITIVE,
00108 eTOTAL1
00109 } ELinkMode;
00110
00115 void SetLinkMode(ELinkMode pMode);
00116
00120 ELinkMode GetLinkMode() const;
00121
00128 void SetLink(KFbxNode const* pNode);
00129
00136 KFbxNode* GetLink();
00137 KFbxNode const* GetLink() const;
00138
00149 void SetAssociateModel(KFbxNode *pNode);
00150
00161 KFbxNode* GetAssociateModel() const;
00162
00171
00176 void AddControlPointIndex(int pIndex, double pWeight);
00177
00182 int GetControlPointIndicesCount();
00183
00188 int* GetControlPointIndices();
00189
00194 double* GetControlPointWeights();
00195
00197
00198 void SetControlPointIWCount(int pCount);
00199
00212
00216 void SetTransformMatrix(KFbxXMatrix& pMatrix);
00217
00222 KFbxXMatrix& GetTransformMatrix(KFbxXMatrix& pMatrix);
00223
00227 void SetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00228
00233 KFbxXMatrix& GetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00234
00238 void SetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00239
00244 KFbxXMatrix& GetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00245
00249 void SetTransformParentMatrix(KFbxXMatrix& pMatrix);
00250
00255 KFbxXMatrix& GetTransformParentMatrix(KFbxXMatrix& pMatrix);
00256
00260 bool IsTransformParentSet() const { return mIsTransformParentSet; }
00261
00263
00267 KFbxCluster& operator=(KFbxCluster const& pCluster);
00268
00270
00271
00272
00273
00274
00275
00277
00278 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00279
00280
00281 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00282
00283 protected:
00284
00285 KFbxCluster(KFbxSdkManager& pManager, char const* pName);
00286 virtual ~KFbxCluster();
00287
00288 virtual void Construct(const KFbxCluster* pFrom);
00289 virtual void Destruct(bool pRecursive, bool pDependents);
00290
00291 virtual bool ConstructProperties( bool pForceSet );
00292
00293 virtual KString GetTypeName() const;
00294 virtual KStringList GetTypeFlags() const;
00295
00302
00303 public:
00308 void SetUserData(KString pUserDataID, KString pUserData);
00309
00311 KString GetUserDataID () const;
00312
00314 KString GetUserData () const;
00315
00317 KString GetUserData (KString pUserDataID) const;
00318
00320
00321 protected:
00322
00323
00324 ELinkMode mLinkMode;
00325 KString mUserDataID;
00326 KString mUserData;
00327 KArrayTemplate<int> mControlPointIndices;
00328 KArrayTemplate<double> mControlPointWeights;
00329 KFbxMatrix mTransform;
00330 KFbxMatrix mTransformLink;
00331 KFbxMatrix mTransformAssociate;
00332 KFbxMatrix mTransformParent;
00333 bool mIsTransformParentSet;
00334
00335 public:
00336
00337 KString mBeforeVersion6LinkName;
00338 KString mBeforeVersion6AssociateModelName;
00339
00340 protected:
00341
00342 KFbxTypedProperty<fbxReference> SrcModel;
00343 KFbxTypedProperty<fbxReference> SrcModelReference;
00344
00345 friend class KFbxScene;
00346 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00347 };
00348
00349 typedef KFbxCluster* HKFbxCluster;
00350
00351 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00352
00353 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCLUSTER_H
00354