FBX SDK Reference Guide: kfbxconstraintsinglechainik.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTSINGLECHAINIK_H
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2008 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 
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             //KFbxTypedProperty<fbxReference> PoleVectorObjectWeights;
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 //  void AddPoleVectorObjectWeight(double pWeight);
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     // Clone
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