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_SINGLE_CHAIN_IK_H_ 00014 #define _FBXSDK_SCENE_CONSTRAINT_SINGLE_CHAIN_IK_H_ 00015 00016 #include <fbxsdk/fbxsdk_def.h> 00017 00018 #include <fbxsdk/core/base/fbxerror.h> 00019 #include <fbxsdk/core/math/fbxvector4.h> 00020 #include <fbxsdk/scene/constraint/fbxconstraint.h> 00021 #include <fbxsdk/scene/fbxgroupname.h> 00022 00023 #include <fbxsdk/fbxsdk_nsbegin.h> 00024 00025 class FbxManager; 00026 00030 class FBXSDK_DLL FbxConstraintSingleChainIK : public FbxConstraint 00031 { 00032 FBXSDK_OBJECT_DECLARE(FbxConstraintSingleChainIK,FbxConstraint); 00033 00034 public: 00037 enum ESolverMode 00038 { 00039 eRotatePlane, 00040 eSingleChain 00041 }; 00042 00045 enum EPoleVectorMode 00046 { 00047 eVector, 00048 eObject 00049 }; 00050 00053 enum EEvaluationMode 00054 { 00055 eNeverTS, 00056 eAutoDetect, 00057 eAlwaysTS 00058 }; 00059 00066 FbxPropertyT<FbxEnum> PoleVectorType; 00067 00070 FbxPropertyT<FbxEnum> SolverType; 00071 00074 FbxPropertyT<FbxEnum> EvaluateTSAnim; 00075 00076 //FbxPropertyT<FbxReference> PoleVectorObjectWeights; 00077 00080 FbxPropertyT<FbxReference> PoleVectorObjects; 00081 00086 FbxPropertyT<FbxDouble3> PoleVector; 00087 00092 FbxPropertyT<FbxDouble> Twist; 00093 00096 FbxPropertyT<FbxReference> FirstJointObject; 00097 00100 FbxPropertyT<FbxReference> EndJointObject; 00101 00104 FbxPropertyT<FbxReference> EffectorObject; 00106 00110 double GetPoleVectorObjectWeight(const FbxObject* pObject) const; 00111 00117 void AddPoleVectorObject(FbxObject* pObject, double pWeight = 100); 00118 00122 int GetConstraintPoleVectorCount() const; 00123 00128 FbxObject* GetPoleVectorObject(int pIndex) const; 00129 00133 void SetFirstJointObject(FbxObject* pObject); 00134 00138 FbxObject* GetFirstJointObject() const; 00139 00143 void SetEndJointObject(FbxObject* pObject); 00144 00148 FbxObject* GetEndJointObject() const; 00149 00153 void SetEffectorObject(FbxObject* pObject); 00154 00158 FbxObject* GetEffectorObject() const; 00159 00160 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00161 protected: 00162 FbxConstraintSingleChainIK(FbxManager& pManager, char const* pName); 00163 00164 virtual bool ConstructProperties( bool pForceSet ); 00165 00166 virtual EType GetConstraintType() const; 00167 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS 00168 }; 00169 00170 inline EFbxType FbxTypeOf(const FbxConstraintSingleChainIK::EPoleVectorMode&){ return eFbxEnum; } 00171 inline EFbxType FbxTypeOf(const FbxConstraintSingleChainIK::ESolverMode&){ return eFbxEnum; } 00172 inline EFbxType FbxTypeOf(const FbxConstraintSingleChainIK::EEvaluationMode&){ return eFbxEnum; } 00173 00174 #include <fbxsdk/fbxsdk_nsend.h> 00175 00176 #endif /* _FBXSDK_SCENE_CONSTRAINT_SINGLE_CHAIN_IK_H_ */