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
00067 class KFBX_DLL KFbxCluster : public KFbxSubDeformer
00068 {
00069 KFBXOBJECT_DECLARE(KFbxCluster,KFbxSubDeformer);
00070 public:
00074 ESubDeformerType GetSubDeformerType() {return eCLUSTER; };
00075
00076
00084 void Reset();
00085
00108 typedef enum
00109 {
00110 eNORMALIZE,
00111 eADDITIVE,
00112 eTOTAL1
00113 } ELinkMode;
00114
00119 void SetLinkMode(ELinkMode pMode);
00120
00124 ELinkMode GetLinkMode() const;
00125
00132 void SetLink(KFbxNode const* pNode);
00133
00140 KFbxNode* GetLink();
00141 KFbxNode const* GetLink() const;
00142
00153 void SetAssociateModel(KFbxNode *pNode);
00154
00165 KFbxNode* GetAssociateModel() const;
00166
00175
00180 void AddControlPointIndex(int pIndex, double pWeight);
00181
00186 int GetControlPointIndicesCount();
00187
00192 int* GetControlPointIndices();
00193
00198 double* GetControlPointWeights();
00199
00201
00202
00215
00219 void SetTransformMatrix(KFbxXMatrix& pMatrix);
00220
00225 KFbxXMatrix& GetTransformMatrix(KFbxXMatrix& pMatrix);
00226
00230 void SetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00231
00236 KFbxXMatrix& GetTransformLinkMatrix(KFbxXMatrix& pMatrix);
00237
00241 void SetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00242
00247 KFbxXMatrix& GetTransformAssociateModelMatrix(KFbxXMatrix& pMatrix);
00248
00252 void SetTransformParentMatrix(KFbxXMatrix& pMatrix);
00253
00258 KFbxXMatrix& GetTransformParentMatrix(KFbxXMatrix& pMatrix);
00259
00263 bool IsTransformParentSet() const { return mIsTransformParentSet; }
00264
00266
00268 KFbxCluster& operator=(KFbxCluster const& pCluster);
00269
00271
00272
00273
00274
00275
00276
00278
00279 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00280
00281
00282 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00283
00284 protected:
00285
00286 KFbxCluster(KFbxSdkManager& pManager, char const* pName);
00287 virtual ~KFbxCluster();
00288
00289 virtual void Construct(const KFbxCluster* pFrom);
00290 virtual void Destruct(bool pRecursive, bool pDependents);
00291
00292 virtual bool ConstructProperties( bool pForceSet );
00293
00294 virtual KString GetTypeName() const;
00295 virtual KStringList GetTypeFlags() const;
00296
00303
00304 public:
00309 void SetUserData(KString pUserDataID, KString pUserData);
00310
00312 KString GetUserDataID () const;
00313
00315 KString GetUserData () const;
00316
00318 KString GetUserData (KString pUserDataID) const;
00319
00321
00322 protected:
00323
00324
00325 ELinkMode mLinkMode;
00326 KString mUserDataID;
00327 KString mUserData;
00328 KArrayTemplate<int> mControlPointIndices;
00329 KArrayTemplate<double> mControlPointWeights;
00330 KFbxMatrix mTransform;
00331 KFbxMatrix mTransformLink;
00332 KFbxMatrix mTransformAssociate;
00333 KFbxMatrix mTransformParent;
00334 bool mIsTransformParentSet;
00335
00336
00337 KString mBeforeVersion6LinkName;
00338 KString mBeforeVersion6AssociateModelName;
00339
00340
00341 KFbxTypedProperty<fbxReference> SrcModel;
00342 KFbxTypedProperty<fbxReference> SrcModelReference;
00343
00344 friend class KFbxReaderFbx;
00345 friend class KFbxReaderFbx6;
00346 friend struct KFbxReaderFbx7Impl;
00347 friend class KFbxWriterFbx;
00348 friend class KFbxWriterFbx6;
00349 friend struct KFbxWriterFbx7Impl;
00350 friend class KFbxScene;
00351
00352 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00353 };
00354
00355 typedef KFbxCluster* HKFbxCluster;
00356
00357 #include <fbxfilesdk_nsend.h>
00358
00359 #endif // _FBXSDK_CLUSTER_H_