kfbxcluster.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_CLUSTER_H_
00005 #define _FBXSDK_CLUSTER_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 <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044 #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <kaydara.h>
00048
00049 #include <kfbxplugins/kfbxsubdeformer.h>
00050 #include <kfbxplugins/kfbxgroupname.h>
00051 #include <kfbxmath/kfbxmatrix.h>
00052
00053 #include <klib/kerror.h>
00054
00055 #include <kbaselib_forward.h>
00056
00057 #include <fbxfilesdk_nsbegin.h>
00058
00059 class KFbxSdkManager;
00060 class KFbxNode;
00061 class KFbxCluster_internal;
00062
00063 class KFBX_DLL KFbxCluster : public KFbxSubDeformer
00064 {
00065 KFBXOBJECT_DECLARE(KFbxCluster);
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
00211
00215 void SetTransformMatrix(KFbxXMatrix& pMatrix);
00216
00221 KFbxXMatrix& GetTransformMatrix(KFbxXMatrix& pMatrix);
00222
00226 void SetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00227
00232 KFbxXMatrix& GetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00233
00237 void SetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00238
00243 KFbxXMatrix& GetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00244
00248 void SetTransformParentMatrix(KFbxXMatrix& pMatrix);
00249
00254 KFbxXMatrix& GetTransformParentMatrix(KFbxXMatrix& pMatrix);
00255
00259 bool IsTransformParentSet() const { return mIsTransformParentSet; }
00260
00262
00264 KFbxCluster& operator=(KFbxCluster const& pCluster);
00265
00267
00268
00269
00270
00271
00272
00274
00275 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00276
00277
00278 virtual KFbxObject* Clone(KFbxObject::ECloneType pCloneType) const;
00279
00280 protected:
00281 static char const* GetNamePrefix() { return SUBDEFORMER_PREFIX; }
00282
00283 KFbxCluster(KFbxSdkManager& pManager, char const* pName);
00284 virtual ~KFbxCluster();
00285
00286 virtual void Destruct(bool pRecursive, bool pDependents);
00287
00288 virtual KString GetTypeName() const;
00289 virtual KStringList GetTypeFlags() const;
00290
00291
00292 virtual KObject* GetFbxObject_internal();
00293 virtual KObject const* GetFbxObject_internal() const;
00294
00301
00302 public:
00307 void SetUserData(KString pUserDataID, KString pUserData);
00308
00310 KString GetUserDataID () const;
00311
00313 KString GetUserData () const;
00314
00316 KString GetUserData (KString pUserDataID) const;
00317
00319
00320 protected:
00321
00322
00323 ELinkMode mLinkMode;
00324 KString mUserDataID;
00325 KString mUserData;
00326 KArrayTemplate<int> mControlPointIndices;
00327 KArrayTemplate<double> mControlPointWeights;
00328 KFbxMatrix mTransform;
00329 KFbxMatrix mTransformLink;
00330 KFbxMatrix mTransformAssociate;
00331 KFbxMatrix mTransformParent;
00332 bool mIsTransformParentSet;
00333
00334
00335 KString mBeforeVersion6LinkName;
00336 KString mBeforeVersion6AssociateModelName;
00337
00338 friend class KFbxReaderFbx;
00339 friend class KFbxReaderFbx6;
00340 friend class KFbxWriterFbx;
00341 friend class KFbxWriterFbx6;
00342 friend class KFbxScene;
00343
00344 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00345 };
00346
00347 typedef KFbxCluster* HKFbxCluster;
00348
00349 #include <fbxfilesdk_nsend.h>
00350
00351 #endif // _FBXSDK_CLUSTER_H_