| 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 fbxlimitsutilities.h |
| 13 | #ifndef _FBXSDK_SCENE_GEOMETRY_LIMIT_UTILS_H_ |
| 14 | #define _FBXSDK_SCENE_GEOMETRY_LIMIT_UTILS_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #include <fbxsdk/core/math/fbxvector4.h> |
| 19 | #include <fbxsdk/core/math/fbxtransforms.h> |
| 20 | #include <fbxsdk/scene/geometry/fbxnode.h> |
| 21 | |
| 22 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 23 | |
| 24 | /** \brief This class represent a utility of limits for transforms. |
| 25 | * \nosubgrouping |
| 26 | */ |
| 27 | class FBXSDK_DLL FbxLimitsUtilities |
| 28 | { |
| 29 | public: |
| 30 | /** \enum EType Limit Type. |
| 31 | * - \e eTranslation Translation type |
| 32 | * - \e eRotation Rotation type |
| 33 | * - \e eScaling Scale type |
| 34 | */ |
| 35 | enum EType |
| 36 | { |
| 37 | eTranslation, |
| 38 | eRotation, |
| 39 | eScaling |
| 40 | }; |
| 41 | |
| 42 | /** \enum ERotationType Rotation type. |
| 43 | * - \e eQuaternion Quaternion rotation type |
| 44 | * - \e eEuler Euler rotation type |
| 45 | */ |
| 46 | enum ERotationType |
| 47 | { |
| 48 | eQuaternion, |
| 49 | eEuler |
| 50 | }; |
| 51 | |
| 52 | /** \enum ERotationClampType Rotation clamp type. |
| 53 | * - \e eRectangular Rectangular clamp type |
| 54 | * - \e eEllipsoid Ellipsoid clamp type |
| 55 | */ |
| 56 | enum ERotationClampType |
| 57 | { |
| 58 | eRectangular, |
| 59 | eEllipsoid |
| 60 | }; |
| 61 | |
| 62 | |
| 63 | FbxLimitsUtilities(FbxNode* pNode); |
| 64 | |
| 65 | /** |
| 66 | * \name Getter/Setter functions |
| 67 | */ |
| 68 | //@{ |
| 69 | void SetAuto(EType pType, bool pAuto); |
| 70 | bool GetAuto(EType pType) const; |
| 71 | |
| 72 | void SetEnable(EType pType, bool pEnable); |
| 73 | bool GetEnable(EType pType) const; |
| 74 | |
| 75 | void SetDefault(EType pType, FbxVector4 pDefault); |
| 76 | FbxVector4 GetDefault(EType pType) const; |
| 77 | |
| 78 | void SetMin(EType pType, FbxVector4 pMin); |
| 79 | FbxVector4 GetMin(EType pType) const; |
| 80 | |
| 81 | void SetMax(EType pType, FbxVector4 pMax); |
| 82 | FbxVector4 GetMax(EType pType) const; |
| 83 | |
| 84 | void SetRotationType(ERotationType pType); |
| 85 | ERotationType GetRotationType() const; |
| 86 | |
| 87 | ERotationClampType GetRotationClampType() const; |
| 88 | |
| 89 | void SetRotationAxis(FbxVector4 pRotationAxis); |
| 90 | FbxVector4 GetRotationAxis() const; |
| 91 | |
| 92 | void SetAxisLength(double pLength); |
| 93 | double GetAxisLength() const; |
| 94 | |
| 95 | void UpdateAutomatic(FbxNode* pNode); |
| 96 | FbxVector4 GetEndPointTranslation(FbxNode* pNode) const; |
| 97 | FbxVector4 GetEndSite(FbxNode* pNode) const; |
| 98 | //@} |
| 99 | |
| 100 | FbxNode* mNode; |
| 101 | double mAxisLength; |
| 102 | }; |
| 103 | |
| 104 | #include <fbxsdk/fbxsdk_nsend.h> |
| 105 | |
| 106 | #endif /* _FBXSDK_SCENE_GEOMETRY_LIMIT_UTILS_H_ */ |
| 107 | |