FBX SDK Reference Guide: kfbxconstraintparent.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTPARENT_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTPARENT_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/fbxfilesdk_nsbegin.h>
00051 
00052 class KFbxSdkManager;
00053 
00054 
00059 class KFBX_DLL KFbxConstraintParent : public KFbxConstraint
00060 {
00061     KFBXOBJECT_DECLARE(KFbxConstraintParent,KFbxConstraint);
00062 
00067             KFbxTypedProperty<fbxBool1>     Lock;
00068             KFbxTypedProperty<fbxBool1>     Active;
00069 
00070             KFbxTypedProperty<fbxBool1>     AffectTranslationX;
00071             KFbxTypedProperty<fbxBool1>     AffectTranslationY;
00072             KFbxTypedProperty<fbxBool1>     AffectTranslationZ;
00073 
00074             KFbxTypedProperty<fbxBool1>     AffectRotationX;
00075             KFbxTypedProperty<fbxBool1>     AffectRotationY;
00076             KFbxTypedProperty<fbxBool1>     AffectRotationZ;
00077 
00078             KFbxTypedProperty<fbxBool1>     AffectScalingX;
00079             KFbxTypedProperty<fbxBool1>     AffectScalingY;
00080             KFbxTypedProperty<fbxBool1>     AffectScalingZ;
00081 
00082             KFbxTypedProperty<fbxDouble1>   Weight;
00083 
00084             KFbxTypedProperty<fbxReference> ConstraintSources;
00085             KFbxTypedProperty<fbxReference> ConstrainedObject;
00087 public:
00091     void SetLock(bool pLock);
00092 
00096     bool GetLock();
00097 
00101     void SetActive(bool pActive);
00102 
00106     bool GetActive();
00107 
00111     void SetAffectTranslationX(bool pAffect);
00112 
00116     bool GetAffectTranslationX();
00117 
00121     void SetAffectTranslationY(bool pAffect);
00122 
00126     bool GetAffectTranslationY();
00127 
00131     void SetAffectTranslationZ(bool pAffect);
00132 
00136     bool GetAffectTranslationZ();
00137 
00141     void SetAffectRotationX(bool pAffect);
00142 
00146     bool GetAffectRotationX();
00147 
00151     void SetAffectRotationY(bool pAffect);
00152 
00156     bool GetAffectRotationY();
00157 
00161     void SetAffectRotationZ(bool pAffect);
00162 
00166     bool GetAffectRotationZ();
00167 
00172     void SetTranslationOffset(KFbxObject* pObject, KFbxVector4 pTranslation);
00173 
00178     KFbxVector4 GetTranslationOffset(KFbxObject* pObject);
00179 
00184     virtual void SetRotationOffset(KFbxObject* pObject, KFbxVector4 pRotation);
00185 
00190     KFbxVector4 GetRotationOffset(KFbxObject* pObject);
00191 
00195     void SetWeight(double pWeight);
00196 
00200     double GetSourceWeight(KFbxObject* pObject);
00201 
00206     void AddConstraintSource(KFbxObject* pObject, double pWeight = 100);
00207 
00211     int GetConstraintSourceCount();
00212 
00217     KFbxObject* GetConstraintSource(int pIndex);
00218 
00222     void SetConstrainedObject(KFbxObject* pObject);
00223 
00227     KFbxObject* GetConstrainedObject();
00228 
00229 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00230 
00231     // Clone
00232     virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00233 
00234 protected:
00235 
00236     KFbxConstraintParent(KFbxSdkManager& pManager, char const* pName);
00237     ~KFbxConstraintParent();
00238 
00239     virtual bool ConstructProperties( bool pForceSet );
00240     virtual void Destruct(bool pRecursive, bool pDependents);
00241 
00242     virtual EConstraintType GetConstraintType();
00243     virtual KString GetTypeName() const;
00244 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00245 };
00246 
00247 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00248 
00249 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTPARENT_H
00250