| 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 fbxconstraintposition.h |
| 13 | #ifndef _FBXSDK_SCENE_CONSTRAINT_POSITION_H_ |
| 14 | #define _FBXSDK_SCENE_CONSTRAINT_POSITION_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 position constraint. |
| 23 | * A position constraint lets you constrain the position of an object based on the position of one or more sources. |
| 24 | * \nosubgrouping |
| 25 | */ |
| 26 | class FBXSDK_DLL FbxConstraintPosition : public FbxConstraint |
| 27 | { |
| 28 | FBXSDK_OBJECT_DECLARE(FbxConstraintPosition,FbxConstraint); |
| 29 | |
| 30 | public: |
| 31 | |
| 32 | /** |
| 33 | * \name Properties |
| 34 | */ |
| 35 | //@{ |
| 36 | /** This property handles whether to affect x axis. |
| 37 | * |
| 38 | * Default value is true. |
| 39 | */ |
| 40 | FbxPropertyT<FbxBool> AffectX; |
| 41 | |
| 42 | /** This property handles whether to affect y axis. |
| 43 | * |
| 44 | * Default value is true. |
| 45 | */ |
| 46 | FbxPropertyT<FbxBool> AffectY; |
| 47 | |
| 48 | /** This property handles whether to affect z axis. |
| 49 | * |
| 50 | * Default value is true. |
| 51 | */ |
| 52 | FbxPropertyT<FbxBool> AffectZ; |
| 53 | |
| 54 | /** This property handles translation offset. |
| 55 | * |
| 56 | * Default value is (0, 0, 0). |
| 57 | */ |
| 58 | FbxPropertyT<FbxDouble3> Translation; |
| 59 | |
| 60 | /** This property handles constraint source objects. |
| 61 | */ |
| 62 | FbxPropertyT<FbxReference> ConstraintSources; |
| 63 | |
| 64 | /** This property handles constraint target objects. |
| 65 | */ |
| 66 | FbxPropertyT<FbxReference> ConstrainedObject; |
| 67 | //@} |
| 68 | |
| 69 | /** Add a source to the constraint. |
| 70 | * \param pObject New source object. |
| 71 | * \param pWeight Weight of the source object. |
| 72 | */ |
| 73 | void AddConstraintSource(FbxObject* pObject, double pWeight = 100); |
| 74 | |
| 75 | /** Remove a source from the constraint. |
| 76 | * \param pObject Source object to remove. |
| 77 | */ |
| 78 | bool RemoveConstraintSource(FbxObject* pObject); |
| 79 | |
| 80 | /** Retrieve the constraint source count. |
| 81 | * \return Current constraint source count. |
| 82 | */ |
| 83 | int GetConstraintSourceCount() const; |
| 84 | |
| 85 | /** Retrieve a constraint source object. |
| 86 | * \param pIndex Index of the source |
| 87 | * \return Current source at the specified index. |
| 88 | */ |
| 89 | FbxObject* GetConstraintSource(int pIndex) const; |
| 90 | |
| 91 | /** Set the constrained object. |
| 92 | * \param pObject The constrained object. |
| 93 | */ |
| 94 | void SetConstrainedObject(FbxObject* pObject); |
| 95 | |
| 96 | /** Retrieve the constrained object. |
| 97 | * \return Current constrained object. |
| 98 | */ |
| 99 | FbxObject* GetConstrainedObject() const; |
| 100 | |
| 101 | /***************************************************************************************************************************** |
| 102 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 103 | *****************************************************************************************************************************/ |
| 104 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 105 | protected: |
| 106 | virtual void ConstructProperties(bool pForceSet); |
| 107 | virtual EType GetConstraintType() const; |
| 108 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 109 | }; |
| 110 | |
| 111 | #include <fbxsdk/fbxsdk_nsend.h> |
| 112 | |
| 113 | #endif /* _FBXSDK_SCENE_CONSTRAINT_POSITION_H_ */ |
| 114 | |