fbxcluster.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2012 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_SCENE_GEOMETRY_CLUSTER_H_
00014 #define _FBXSDK_SCENE_GEOMETRY_CLUSTER_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/scene/geometry/fbxsubdeformer.h>
00019 #include <fbxsdk/scene/fbxgroupname.h>
00020 #include <fbxsdk/core/math/fbxmatrix.h>
00021 
00022 #include <fbxsdk/core/base/fbxerror.h>
00023 
00024 #include <fbxsdk/fbxsdk_nsbegin.h>
00025 
00026 class FbxManager;
00027 class FbxNode;
00028 
00054 class FBXSDK_DLL FbxCluster : public FbxSubDeformer
00055 {
00056     FBXSDK_OBJECT_DECLARE(FbxCluster,FbxSubDeformer);
00057 
00058 public:
00066     EType GetSubDeformerType() const {return eCluster; };
00067 
00075     void Reset();
00077 
00087     enum ELinkMode
00088     {
00089         eNormalize,       
00093         eAdditive,
00104         eTotalOne   
00107     };
00108 
00113     void SetLinkMode(ELinkMode pMode);
00114 
00118     ELinkMode GetLinkMode() const;
00119 
00124     void SetLink(const FbxNode* pNode);
00125 
00130     FbxNode* GetLink();
00131 
00136     const FbxNode* GetLink() const;
00137 
00146     void SetAssociateModel(FbxNode* pNode);
00147 
00156     FbxNode* GetAssociateModel() const;
00158 
00166 
00171     void AddControlPointIndex(int pIndex, double pWeight);
00172 
00177     int GetControlPointIndicesCount() const;
00178 
00183     int* GetControlPointIndices() const;
00184 
00189     double* GetControlPointWeights() const;
00190 
00192 
00197     void SetControlPointIWCount(int pCount);
00198 
00212 
00216     void SetTransformMatrix(const FbxAMatrix& pMatrix);
00217 
00222     FbxAMatrix& GetTransformMatrix(FbxAMatrix& pMatrix) const;
00223 
00227     void SetTransformLinkMatrix(const FbxAMatrix& pMatrix);
00228 
00233     FbxAMatrix& GetTransformLinkMatrix(FbxAMatrix& pMatrix) const;
00234 
00238     void SetTransformAssociateModelMatrix(const FbxAMatrix& pMatrix);
00239 
00244     FbxAMatrix& GetTransformAssociateModelMatrix(FbxAMatrix& pMatrix) const;
00245 
00249     void SetTransformParentMatrix(const FbxAMatrix& pMatrix);
00250 
00255     FbxAMatrix& GetTransformParentMatrix(FbxAMatrix& pMatrix) const;
00256 
00260     bool IsTransformParentSet() const { return mIsTransformParentSet; }
00261 
00263 
00265 //
00266 //  WARNING!
00267 //
00268 //  Anything beyond these lines may not be documented accurately and is
00269 //  subject to change without notice.
00270 //
00272 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00273 
00274     virtual FbxObject& Copy(const FbxObject& pObject);
00275 
00282 
00283 
00288     void SetUserData(const char* pUserDataID, const char* pUserData);
00289 
00291     const char* GetUserDataID () const;
00292 
00294     const char* GetUserData () const;
00295 
00297     const char* GetUserData (const char* pUserDataID) const;
00298 
00300 
00301     // For pre version 6 support
00302     FbxString   mBeforeVersion6LinkName;
00303     FbxString   mBeforeVersion6AssociateModelName;
00304 
00305 
00306 protected:
00307     FbxCluster(FbxManager& pManager, const char* pName);
00308 
00309     virtual void Construct(const FbxCluster* pFrom);
00310     virtual bool ConstructProperties( bool pForceSet );
00311 
00312     virtual FbxStringList GetTypeFlags() const;
00313 
00314 
00315     //  Cluster deformer
00316     ELinkMode               mLinkMode;
00317     FbxString               mUserDataID;
00318     FbxString               mUserData;
00319     FbxArray<int>           mControlPointIndices;
00320     FbxArray<double>        mControlPointWeights;
00321     FbxMatrix              mTransform;
00322     FbxMatrix              mTransformLink;
00323     FbxMatrix              mTransformAssociate;
00324     FbxMatrix              mTransformParent;
00325     bool                    mIsTransformParentSet;
00326 
00327     // Properties
00328     FbxPropertyT<FbxReference> SrcModel;
00329     FbxPropertyT<FbxReference> SrcModelReference;
00330 
00331     friend class FbxScene;
00332 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00333 };
00334 
00335 #include <fbxsdk/fbxsdk_nsend.h>
00336 
00337 #endif /* _FBXSDK_SCENE_GEOMETRY_CLUSTER_H_ */