| 1 | /**************************************************************************************** |
| 2 | |
| 3 | Copyright (C) 2015 Autodesk, Inc. |
| 4 | All rights reserved. |
| 5 | |
| 6 | Use of this software is subject to the terms of the Autodesk license agreement |
| 7 | provided at the time of installation or download, or which otherwise accompanies |
| 8 | this software in either electronic or hard copy form. |
| 9 | |
| 10 | ****************************************************************************************/ |
| 11 | |
| 12 | //! \file fbxconstraintrotation.h |
| 13 | #ifndef _FBXSDK_SCENE_CONSTRAINT_ROTATION_H_ |
| 14 | #define _FBXSDK_SCENE_CONSTRAINT_ROTATION_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #include <fbxsdk/scene/constraint/fbxconstraint.h> |
| 19 | |
| 20 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 21 | |
| 22 | /** \brief This constraint class contains methods for accessing the properties of a rotation constraint. |
| 23 | * A rotation constraint lets you constrain the rotation of an object based on the rotation of one or more sources. |
| 24 | * \nosubgrouping |
| 25 | */ |
| 26 | class FBXSDK_DLL FbxConstraintRotation : public FbxConstraint |
| 27 | { |
| 28 | FBXSDK_OBJECT_DECLARE(FbxConstraintRotation, FbxConstraint); |
| 29 | |
| 30 | public: |
| 31 | /** |
| 32 | * \name Properties |
| 33 | */ |
| 34 | //@{ |
| 35 | /** This property handles whether to affect x axis. |
| 36 | * Default value is true. |
| 37 | */ |
| 38 | FbxPropertyT<FbxBool> AffectX; |
| 39 | /** This property handles whether to affect y axis. |
| 40 | * Default value is true. |
| 41 | */ |
| 42 | FbxPropertyT<FbxBool> AffectY; |
| 43 | |
| 44 | /** This property handles whether to affect z axis. |
| 45 | * Default value is true. |
| 46 | */ |
| 47 | FbxPropertyT<FbxBool> AffectZ; |
| 48 | |
| 49 | /** This property handles rotation offset. |
| 50 | * Default value is (0, 0, 0). |
| 51 | */ |
| 52 | FbxPropertyT<FbxDouble3> Rotation; |
| 53 | |
| 54 | /** This property handles constraint source objects. |
| 55 | */ |
| 56 | FbxPropertyT<FbxReference> ConstraintSources; |
| 57 | |
| 58 | /** This property handles constraint target objects. |
| 59 | */ |
| 60 | FbxPropertyT<FbxReference> ConstrainedObject; |
| 61 | //@} |
| 62 | |
| 63 | /** Add a source to the constraint. |
| 64 | * \param pObject New source object. |
| 65 | * \param pWeight Weight of the source object. |
| 66 | */ |
| 67 | void AddConstraintSource(FbxObject* pObject, double pWeight = 100); |
| 68 | |
| 69 | /** Retrieve the constraint source count. |
| 70 | * \return Current constraint source count. |
| 71 | */ |
| 72 | int GetConstraintSourceCount() const; |
| 73 | |
| 74 | /** Retrieve a constraint source object. |
| 75 | * \param pIndex Index of the source object |
| 76 | * \return Current source at the specified index. |
| 77 | */ |
| 78 | FbxObject* GetConstraintSource(int pIndex) const; |
| 79 | |
| 80 | /** Set the constrained object. |
| 81 | * \param pObject The constrained object. |
| 82 | */ |
| 83 | void SetConstrainedObject(FbxObject* pObject); |
| 84 | |
| 85 | /** Retrieve the constrained object. |
| 86 | * \return Current constrained object. |
| 87 | */ |
| 88 | FbxObject* GetConstrainedObject() const; |
| 89 | |
| 90 | /***************************************************************************************************************************** |
| 91 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 92 | *****************************************************************************************************************************/ |
| 93 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 94 | protected: |
| 95 | virtual void ConstructProperties(bool pForceSet); |
| 96 | virtual EType GetConstraintType() const; |
| 97 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 98 | }; |
| 99 | |
| 100 | #include <fbxsdk/fbxsdk_nsend.h> |
| 101 | |
| 102 | #endif /* _FBXSDK_SCENE_CONSTRAINT_ROTATION_H_ */ |
| 103 | |