00001
00004 #ifndef _FBXSDK_CONSTRAINT_AIM_H_
00005 #define _FBXSDK_CONSTRAINT_AIM_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 <kaydaradef.h>
00043 #ifndef KFBX_DLL
00044 #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046
00047 #include <kaydara.h>
00048
00049 #include <kfbxplugins/kfbxconstraint.h>
00050 #include <kfbxplugins/kfbxgroupname.h>
00051 #include <kfbxmath/kfbxvector4.h>
00052
00053 #include <klib/kerror.h>
00054
00055 #include <fbxfilesdk_nsbegin.h>
00056
00057 class KFbxSdkManager;
00058
00063 class KFBX_DLL KFbxConstraintAim : public KFbxConstraint
00064 {
00065 KFBXOBJECT_DECLARE(KFbxConstraintAim,KFbxConstraint);
00066
00071 KFbxTypedProperty<fbxBool1> Lock;
00072 KFbxTypedProperty<fbxBool1> Active;
00073
00074 KFbxTypedProperty<fbxDouble1> Weight;
00075 KFbxTypedProperty<fbxDouble3> RotationOffset;
00076
00077 KFbxTypedProperty<fbxReference> AimAtObjects;
00078 KFbxTypedProperty<fbxReference> ConstrainedObject;
00079
00080 KFbxTypedProperty<fbxEnum> WorldUpType;
00081 KFbxTypedProperty<fbxReference> WorldUpObject;
00082 KFbxTypedProperty<fbxDouble3> WorldUpVector;
00083 KFbxTypedProperty<fbxDouble3> UpVector;
00084 KFbxTypedProperty<fbxDouble3> AimVector;
00085
00086 KFbxTypedProperty<fbxBool1> AffectX;
00087 KFbxTypedProperty<fbxBool1> AffectY;
00088 KFbxTypedProperty<fbxBool1> AffectZ;
00090
00091
00092 public:
00093 typedef enum
00094 {
00095 eAimAtSceneUp,
00096 eAimAtObjectUp,
00097 eAimAtObjectRotationUp,
00098 eAimAtVector,
00099 eAimAtNone,
00100 eAimAtCount
00101 } EAimConstraintWoldUpType;
00102
00106 inline void SetLock(bool pLock) { Lock.Set(pLock); }
00107
00111 inline bool GetLock() { return Lock.Get(); }
00112
00116 inline void SetActive(bool pActive) { Active.Set(pActive); }
00117
00121 inline bool GetActive() { return Active.Get(); }
00122
00126 void SetWeight(double pWeight);
00127
00131 virtual void SetOffset(KFbxVector4 pRotation);
00132
00136 KFbxVector4 GetOffset();
00137
00141 double GetSourceWeight(KFbxObject* pObject);
00142
00147 void AddConstraintSource(KFbxObject* pObject, double pWeight = 100);
00148
00152 int GetConstraintSourceCount();
00153
00157 KFbxObject* GetConstraintSource(int pIndex);
00158
00162 void SetConstrainedObject(KFbxObject* pObject);
00163
00167 KFbxObject* GetConstrainedObject();
00168
00172 void SetWorldUpType(EAimConstraintWoldUpType pType);
00173
00177 EAimConstraintWoldUpType GetWorldUpType();
00178
00182 void SetWorldUpObject(KFbxObject* pObject);
00183
00187 KFbxObject* GetWorldUpObject();
00188
00192 void SetWorldUpVector(KFbxVector4 pVector);
00193
00197 KFbxVector4 GetWorldUpVector();
00198
00202 void SetUpVector(KFbxVector4 pVector);
00203
00207 KFbxVector4 GetUpVector();
00208
00212 void SetAimVector(KFbxVector4 pVector);
00213
00217 KFbxVector4 GetAimVector();
00218
00222 inline void SetAffectX(bool pAffect) { AffectX.Set(pAffect); }
00223
00227 inline bool GetAffectX() { return AffectX.Get(); }
00228
00232 inline void SetAffectY(bool pAffect){ AffectY.Set(pAffect); }
00233
00237 inline bool GetAffectY() { return AffectY.Get(); }
00238
00242 inline void SetAffectZ(bool pAffect) { AffectZ.Set(pAffect); }
00243
00247 inline bool GetAffectZ() { return AffectZ.Get(); }
00248
00249 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00250
00251
00252 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00253
00254 protected:
00255
00256 KFbxConstraintAim(KFbxSdkManager& pManager, char const* pName);
00257 ~KFbxConstraintAim();
00258
00259 virtual bool ConstructProperties(bool pForceSet);
00260 virtual void Destruct(bool pRecursive, bool pDependents);
00261
00262 virtual EConstraintType GetConstraintType();
00263 virtual KString GetTypeName() const;
00264
00265 friend class KFbxWriterFbx6;
00266 friend class KFbxReaderFbx;
00267
00268 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00269 };
00270
00271 inline EFbxType FbxTypeOf( KFbxConstraintAim::EAimConstraintWoldUpType const &pItem ) { return eENUM; }
00272
00273 #include <fbxfilesdk_nsend.h>
00274
00275 #endif // _FBXSDK_CONSTRAINT_AIM_H_
00276
00277