00001
00004 #ifndef FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTAIM_H
00005 #define FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTAIM_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 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00048
00049 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00050
00051 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00052
00053 class KFbxSdkManager;
00054
00059 class KFBX_DLL KFbxConstraintAim : public KFbxConstraint
00060 {
00061 KFBXOBJECT_DECLARE(KFbxConstraintAim,KFbxConstraint);
00062
00067 KFbxTypedProperty<fbxBool1> Lock;
00068 KFbxTypedProperty<fbxBool1> Active;
00069
00070 KFbxTypedProperty<fbxDouble1> Weight;
00071 KFbxTypedProperty<fbxDouble3> RotationOffset;
00072
00073 KFbxTypedProperty<fbxReference> AimAtObjects;
00074 KFbxTypedProperty<fbxReference> ConstrainedObject;
00075
00076 KFbxTypedProperty<fbxEnum> WorldUpType;
00077 KFbxTypedProperty<fbxReference> WorldUpObject;
00078 KFbxTypedProperty<fbxDouble3> WorldUpVector;
00079 KFbxTypedProperty<fbxDouble3> UpVector;
00080 KFbxTypedProperty<fbxDouble3> AimVector;
00081
00082 KFbxTypedProperty<fbxBool1> AffectX;
00083 KFbxTypedProperty<fbxBool1> AffectY;
00084 KFbxTypedProperty<fbxBool1> AffectZ;
00086
00087
00088 public:
00089 typedef enum
00090 {
00091 eAimAtSceneUp,
00092 eAimAtObjectUp,
00093 eAimAtObjectRotationUp,
00094 eAimAtVector,
00095 eAimAtNone,
00096 eAimAtCount
00097 } EAimConstraintWoldUpType;
00098
00102 inline void SetLock(bool pLock) { Lock.Set(pLock); }
00103
00107 inline bool GetLock() { return Lock.Get(); }
00108
00112 inline void SetActive(bool pActive) { Active.Set(pActive); }
00113
00117 inline bool GetActive() { return Active.Get(); }
00118
00122 void SetWeight(double pWeight);
00123
00127 virtual void SetOffset(KFbxVector4 pRotation);
00128
00132 KFbxVector4 GetOffset();
00133
00137 double GetSourceWeight(KFbxObject* pObject);
00138
00143 void AddConstraintSource(KFbxObject* pObject, double pWeight = 100);
00144
00148 int GetConstraintSourceCount();
00149
00154 KFbxObject* GetConstraintSource(int pIndex);
00155
00159 void SetConstrainedObject(KFbxObject* pObject);
00160
00164 KFbxObject* GetConstrainedObject();
00165
00169 void SetWorldUpType(EAimConstraintWoldUpType pType);
00170
00174 EAimConstraintWoldUpType GetWorldUpType();
00175
00179 void SetWorldUpObject(KFbxObject* pObject);
00180
00184 KFbxObject* GetWorldUpObject();
00185
00189 void SetWorldUpVector(KFbxVector4 pVector);
00190
00194 KFbxVector4 GetWorldUpVector();
00195
00199 void SetUpVector(KFbxVector4 pVector);
00200
00204 KFbxVector4 GetUpVector();
00205
00209 void SetAimVector(KFbxVector4 pVector);
00210
00214 KFbxVector4 GetAimVector();
00215
00219 inline void SetAffectX(bool pAffect) { AffectX.Set(pAffect); }
00220
00224 inline bool GetAffectX() { return AffectX.Get(); }
00225
00229 inline void SetAffectY(bool pAffect){ AffectY.Set(pAffect); }
00230
00234 inline bool GetAffectY() { return AffectY.Get(); }
00235
00239 inline void SetAffectZ(bool pAffect) { AffectZ.Set(pAffect); }
00240
00244 inline bool GetAffectZ() { return AffectZ.Get(); }
00245
00246 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00247
00248
00249 virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
00250
00251 protected:
00252
00253 KFbxConstraintAim(KFbxSdkManager& pManager, char const* pName);
00254 ~KFbxConstraintAim();
00255
00256 virtual bool ConstructProperties(bool pForceSet);
00257 virtual void Destruct(bool pRecursive, bool pDependents);
00258
00259 virtual EConstraintType GetConstraintType();
00260 virtual KString GetTypeName() const;
00261 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00262 };
00263
00264 inline EFbxType FbxTypeOf( KFbxConstraintAim::EAimConstraintWoldUpType const &pItem ) { return eENUM; }
00265
00266 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00267
00268 #endif // FBXFILESDK_KFBXPLUGINS_KFBXCONSTRAINTAIM_H
00269