00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_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 <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044
00045 #include <fbxfilesdk/kfbxplugins/kfbxconstraint.h>
00046 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h>
00047
00048 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00049
00050 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00051
00052 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00053
00054 class KFbxSdkManager;
00055
00059 class KFBX_DLL KFbxConstraintSingleChainIK : public KFbxConstraint
00060 {
00061 KFBXOBJECT_DECLARE(KFbxConstraintSingleChainIK,KFbxConstraint);
00062
00067 KFbxTypedProperty<fbxBool1> Lock;
00068 KFbxTypedProperty<fbxBool1> Active;
00069
00070 KFbxTypedProperty<fbxEnum> PoleVectorType;
00071 KFbxTypedProperty<fbxEnum> SolverType;
00072 KFbxTypedProperty<fbxEnum> EvaluateTSAnim;
00073
00074 KFbxTypedProperty<fbxDouble1> Weight;
00075
00076 KFbxTypedProperty<fbxReference> PoleVectorObjects;
00077 KFbxTypedProperty<fbxDouble3> PoleVector;
00078 KFbxTypedProperty<fbxDouble1> Twist;
00079
00080 KFbxTypedProperty<fbxReference> FirstJointObject;
00081 KFbxTypedProperty<fbxReference> EndJointObject;
00082 KFbxTypedProperty<fbxReference> EffectorObject;
00084
00085 public:
00090 typedef enum
00091 {
00092 eRP_SOLVER,
00093 eSC_SOLVER
00094 } ESolverType;
00095
00100 typedef enum
00101 {
00102 ePOLE_VECTOR_TYPE_VECTOR,
00103 ePOLE_VECTOR_TYPE_OBJECT
00104 } EPoleVectorType;
00105
00111 typedef enum
00112 {
00113 eEVAL_TS_NEVER,
00114 eEVAL_TS_AUTO_DETECT,
00115 eEVAL_TS_ALWAYS
00116 } EEvalTS;
00117
00121 void SetLock(bool pLock);
00122
00126 bool GetLock();
00127
00131 void SetActive(bool pActive);
00132
00136 bool GetActive();
00137
00141 void SetPoleVectorType(EPoleVectorType pType);
00142
00146 EPoleVectorType GetPoleVectorType();
00147
00151 void SetSolverType(ESolverType pType);
00152
00156 ESolverType GetSolverType();
00157
00161 void SetEvalTS(EEvalTS pEval);
00162
00166 EEvalTS GetEvalTS();
00167
00171 void SetWeight(double pWeight);
00172
00176 double GetWeight();
00177
00178
00179
00180
00184 double GetPoleVectorObjectWeight(KFbxObject* pObject);
00185
00191 void AddPoleVectorObject(KFbxObject* pObject, double pWeight = 100);
00192
00196 int GetConstraintPoleVectorCount();
00197
00202 KFbxObject* GetPoleVectorObject(int pIndex);
00203
00207 void SetPoleVector(KFbxVector4 pVector);
00208
00212 KFbxVector4 GetPoleVector();
00213
00217 void SetTwist(double pTwist);
00218
00222 double GetTwist();
00223
00227 void SetFirstJointObject(KFbxObject* pObject);
00228
00232 KFbxObject* GetFirstJointObject();
00233
00237 void SetEndJointObject(KFbxObject* pObject);
00238
00242 KFbxObject* GetEndJointObject();
00243
00247 void SetEffectorObject(KFbxObject* pObject);
00248
00252 KFbxObject* GetEffectorObject();
00253
00254 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00255
00256
00257 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00258
00259 protected:
00260
00261 KFbxConstraintSingleChainIK(KFbxSdkManager& pManager, char const* pName);
00262 ~KFbxConstraintSingleChainIK();
00263
00264 virtual bool ConstructProperties( bool pForceSet );
00265 virtual void Destruct(bool pRecursive, bool pDependents);
00266
00267 virtual EConstraintType GetConstraintType();
00268 virtual KString GetTypeName() const;
00269 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00270 };
00271
00272 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::EPoleVectorType const &pItem ) { return eENUM; }
00273 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::ESolverType const &pItem ) { return eENUM; }
00274 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::EEvalTS const &pItem ) { return eENUM; }
00275
00276
00277 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00278
00279 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H
00280