00001 00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H 00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H 00006 00007 /************************************************************************************** 00008 00009 Copyright (C) 2001 - 2010 Autodesk, Inc. and/or its licensors. 00010 All Rights Reserved. 00011 00012 The coded instructions, statements, computer programs, and/or related material 00013 (collectively the "Data") in these files contain unpublished information 00014 proprietary to Autodesk, Inc. and/or its licensors, which is protected by 00015 Canada and United States of America federal copyright law and by international 00016 treaties. 00017 00018 The Data may not be disclosed or distributed to third parties, in whole or in 00019 part, without the prior written consent of Autodesk, Inc. ("Autodesk"). 00020 00021 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY. 00022 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 00023 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING 00024 BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 00025 NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 00026 WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION 00027 OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 00028 00029 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 00030 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES 00031 OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER 00032 SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE 00033 OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND), 00034 HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED 00035 FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE, 00036 ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE, 00037 WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS 00038 OR DAMAGE. 00039 00040 **************************************************************************************/ 00041 #include <fbxfilesdk/fbxfilesdk_def.h> 00042 00043 #include <fbxfilesdk/kfbxplugins/kfbxconstraint.h> 00044 #include <fbxfilesdk/kfbxplugins/kfbxgroupname.h> 00045 00046 #include <fbxfilesdk/components/kbaselib/klib/kerror.h> 00047 00048 #include <fbxfilesdk/kfbxmath/kfbxvector4.h> 00049 00050 #include <fbxfilesdk/fbxfilesdk_nsbegin.h> 00051 00052 class KFbxSdkManager; 00053 00057 class KFBX_DLL KFbxConstraintSingleChainIK : public KFbxConstraint 00058 { 00059 KFBXOBJECT_DECLARE(KFbxConstraintSingleChainIK,KFbxConstraint); 00060 00061 public: 00068 KFbxTypedProperty<fbxEnum> PoleVectorType; 00069 00072 KFbxTypedProperty<fbxEnum> SolverType; 00073 00076 KFbxTypedProperty<fbxEnum> EvaluateTSAnim; 00077 00078 //KFbxTypedProperty<fbxReference> PoleVectorObjectWeights; 00079 00082 KFbxTypedProperty<fbxReference> PoleVectorObjects; 00083 00088 KFbxTypedProperty<fbxDouble3> PoleVector; 00089 00094 KFbxTypedProperty<fbxDouble1> Twist; 00095 00098 KFbxTypedProperty<fbxReference> FirstJointObject; 00099 00102 KFbxTypedProperty<fbxReference> EndJointObject; 00103 00106 KFbxTypedProperty<fbxReference> EffectorObject; 00108 00113 typedef enum 00114 { 00115 eRP_SOLVER, 00116 eSC_SOLVER 00117 } ESolverType; 00118 00123 typedef enum 00124 { 00125 ePOLE_VECTOR_TYPE_VECTOR, 00126 ePOLE_VECTOR_TYPE_OBJECT 00127 } EPoleVectorType; 00128 00134 typedef enum 00135 { 00136 eEVAL_TS_NEVER, 00137 eEVAL_TS_AUTO_DETECT, 00138 eEVAL_TS_ALWAYS 00139 } EEvalTS; 00140 00144 void SetLock(bool pLock); 00145 00149 bool GetLock() const; 00150 00154 void SetPoleVectorType(EPoleVectorType pType); 00155 00159 EPoleVectorType GetPoleVectorType() const; 00160 00164 void SetSolverType(ESolverType pType); 00165 00169 ESolverType GetSolverType() const; 00170 00174 void SetEvalTS(EEvalTS pEval); 00175 00179 EEvalTS GetEvalTS() const; 00180 00184 void SetWeight(double pWeight); 00185 00189 double GetWeight() const; 00190 00191 00192 // void AddPoleVectorObjectWeight(double pWeight); 00193 00197 double GetPoleVectorObjectWeight(const KFbxObject* pObject) const; 00198 00204 void AddPoleVectorObject(KFbxObject* pObject, double pWeight = 100); 00205 00209 int GetConstraintPoleVectorCount() const; 00210 00215 KFbxObject* GetPoleVectorObject(int pIndex) const; 00216 00220 void SetPoleVector(KFbxVector4 pVector); 00221 00225 KFbxVector4 GetPoleVector() const; 00226 00230 void SetTwist(double pTwist); 00231 00235 double GetTwist() const; 00236 00240 void SetFirstJointObject(KFbxObject* pObject); 00241 00245 KFbxObject* GetFirstJointObject() const; 00246 00250 void SetEndJointObject(KFbxObject* pObject); 00251 00255 KFbxObject* GetEndJointObject() const; 00256 00260 void SetEffectorObject(KFbxObject* pObject); 00261 00265 KFbxObject* GetEffectorObject() const; 00266 00267 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00268 protected: 00269 KFbxConstraintSingleChainIK(KFbxSdkManager& pManager, char const* pName); 00270 00271 virtual bool ConstructProperties( bool pForceSet ); 00272 00273 virtual EConstraintType GetConstraintType() const; 00274 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS 00275 }; 00276 00277 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::EPoleVectorType const &pItem ) { return eENUM; } 00278 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::ESolverType const &pItem ) { return eENUM; } 00279 inline EFbxType FbxTypeOf( KFbxConstraintSingleChainIK::EEvalTS const &pItem ) { return eENUM; } 00280 00281 00282 #include <fbxfilesdk/fbxfilesdk_nsend.h> 00283 00284 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H 00285