- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxcharacterpose.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_CONSTRAINT_CHARACTER_POSE_H_
    00014 #define _FBXSDK_SCENE_CONSTRAINT_CHARACTER_POSE_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/fbxobject.h>
    00019 #include <fbxsdk/core/base/fbxstring.h>
    00020 #include <fbxsdk/core/math/fbxaffinematrix.h>
    00021 #include <fbxsdk/scene/fbxscene.h>
    00022 #include <fbxsdk/scene/geometry/fbxnode.h>
    00023 #include <fbxsdk/scene/constraint/fbxcharacter.h>
    00024
    00025 #include <fbxsdk/fbxsdk_nsbegin.h>
    00026
    00027 class FbxScene;
    00028 class FbxManager;
    00029
    00054 class FBXSDK_DLL FbxCharacterPose : public FbxObject
    00055 {
    00056     FBXSDK_OBJECT_DECLARE(FbxCharacterPose,FbxObject);
    00057
    00058 public:
    00060     void Reset();
    00061
    00065     FbxNode* GetRootNode() const;
    00066
    00070     FbxCharacter* GetCharacter() const;
    00071
    00077     bool GetOffset(FbxCharacter::ENodeId pCharacterNodeId, FbxAMatrix& pOffset) const
    00078     {
    00079         FbxCharacterLink lCharacterLink;
    00080
    00081         if (!GetCharacter()) return false;
    00082
    00083         if (!GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink)) return false;
    00084
    00085         pOffset.SetTRS(lCharacterLink.mOffsetT, lCharacterLink.mOffsetR, lCharacterLink.mOffsetS);
    00086
    00087         return true;
    00088     }
    00089
    00097     bool GetLocalPosition(FbxCharacter::ENodeId pCharacterNodeId, FbxVector4& pLocalT, FbxVector4& pLocalR, FbxVector4& pLocalS) const
    00098     {
    00099         FbxCharacterLink lCharacterLink;
    00100         if( !GetCharacter() || !GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink) ) return false;
    00101
    00102         pLocalT = lCharacterLink.mNode->EvaluateLocalTranslation();
    00103         pLocalR = lCharacterLink.mNode->EvaluateLocalRotation();
    00104         pLocalS = lCharacterLink.mNode->EvaluateLocalScaling();
    00105         return true;
    00106     }
    00107
    00113     bool GetGlobalPosition(FbxCharacter::ENodeId pCharacterNodeId, FbxAMatrix& pGlobalPosition) const
    00114     {
    00115         FbxCharacterLink lCharacterLink;
    00116         if( !GetCharacter() || !GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink) ) return false;
    00117
    00118         pGlobalPosition = lCharacterLink.mNode->EvaluateGlobalTransform();
    00119         return true;
    00120     }
    00121
    00123 //
    00124 //  WARNING!
    00125 //
    00126 //  Anything beyond these lines may not be documented accurately and is
    00127 //  subject to change without notice.
    00128 //
    00130 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00131     virtual FbxObject& Copy(const FbxObject& pObject);
    00132
    00133 private:
    00134     FbxCharacterPose(FbxManager& pManager, char const* pName);
    00135
    00136     virtual void Destruct(bool pRecursive, bool pDependents);
    00137
    00138     void CopyNode(FbxNode* pSrcNode, FbxNode* pDstNode);
    00139     void CopyCharacter(FbxCharacter* pSrcCharacter, FbxCharacter* pDstCharacter, FbxNode* pDstRootNode);
    00140
    00141 public:
    00142     FbxScene* mScene;
    00143
    00144 private:
    00145     friend class FbxScene;
    00146 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00147
    00148 };
    00149
    00150 #include <fbxsdk/fbxsdk_nsend.h>
    00151
    00152 #endif /* _FBXSDK_SCENE_CONSTRAINT_CHARACTER_POSE_H_ */