fbxconstraintposition.h 4.0 KB

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