fbxconstraintaim.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 fbxconstraintaim.h
  9. #ifndef _FBXSDK_SCENE_CONSTRAINT_AIM_H_
  10. #define _FBXSDK_SCENE_CONSTRAINT_AIM_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #include <fbxsdk/scene/constraint/fbxconstraint.h>
  13. #include <fbxsdk/fbxsdk_nsbegin.h>
  14. /** An aim constraint governs an object's orientation so that the object points to other objects.
  15. * For example, you can use the aim constraint to point a light at an object or group of objects.
  16. * \nosubgrouping
  17. */
  18. class FBXSDK_DLL FbxConstraintAim : public FbxConstraint
  19. {
  20. FBXSDK_OBJECT_DECLARE(FbxConstraintAim, FbxConstraint);
  21. public:
  22. /** \enum EWorldUp Constraint world up type, which has the same meaning with Maya.
  23. */
  24. enum EWorldUp
  25. {
  26. eAimAtSceneUp, //! Constraint scene up type.
  27. eAimAtObjectUp, //! Constraint object up type.
  28. eAimAtObjectRotationUp, //! Constraint object rotation up type.
  29. eAimAtVector, //! Constraint vector type.
  30. eAimAtNone, //! None constraint type.
  31. eAimAtCount //! Constraint world up type count.
  32. };
  33. /**
  34. * \name Properties
  35. */
  36. //@{
  37. /** This property handles the rotation offset value.
  38. *
  39. * Default value is (0, 0, 0).
  40. */
  41. FbxPropertyT<FbxDouble3> RotationOffset;
  42. /** This property provides access to the object or objects which are the targets.
  43. */
  44. FbxPropertyT<FbxReference> AimAtObjects;
  45. /** This property provides access to the object being aimed.
  46. */
  47. FbxPropertyT<FbxReference> ConstrainedObject;
  48. /** This property handles world up type.
  49. */
  50. FbxPropertyT<FbxEnum> WorldUpType;
  51. /** This property handles world up object.
  52. */
  53. FbxPropertyT<FbxReference> WorldUpObject;
  54. /** This property handles world up vector.
  55. *
  56. * Default value is (0, 1, 0).
  57. */
  58. FbxPropertyT<FbxDouble3> WorldUpVector;
  59. /** This property handles up vector.
  60. *
  61. * Default value is (0, 1, 0).
  62. */
  63. FbxPropertyT<FbxDouble3> UpVector;
  64. /** This property enables you set a specific axis for the constrained object to orient towards.
  65. *
  66. * Default value is (1, 0, 0).
  67. */
  68. FbxPropertyT<FbxDouble3> AimVector;
  69. /** This property handles whether to affect the rotation around X axis.
  70. *
  71. * Default value is true.
  72. */
  73. FbxPropertyT<FbxBool> AffectX;
  74. /** This property handles whether to affect the rotation around Y axis.
  75. *
  76. * Default value is true.
  77. */
  78. FbxPropertyT<FbxBool> AffectY;
  79. /** This property handles whether to affect the rotation around Z axis.
  80. *
  81. * Default value is true.
  82. */
  83. FbxPropertyT<FbxBool> AffectZ;
  84. //@}
  85. /** Add a source to the constraint.
  86. * \param pObject New source object.
  87. * \param pWeight Weight of the source object.
  88. */
  89. void AddConstraintSource(FbxObject* pObject, double pWeight = 100);
  90. /** Retrieve the constraint source count.
  91. * \return Current constraint source count.
  92. */
  93. int GetConstraintSourceCount() const;
  94. /** Retrieve a constraint source object.
  95. * \param pIndex The specified index.
  96. * \return Current source at the specified index.
  97. */
  98. FbxObject* GetConstraintSource(int pIndex) const;
  99. /** Set the constrained object.
  100. * \param pObject The constrained object.
  101. */
  102. void SetConstrainedObject(FbxObject* pObject);
  103. /** Retrieve the constrained object.
  104. * \return Current constrained object.
  105. */
  106. FbxObject* GetConstrainedObject() const;
  107. /** Set the world up object.
  108. * \param pObject The new world up object.
  109. */
  110. void SetWorldUpObject(FbxObject* pObject);
  111. /** Retrieve the world up object.
  112. * \return The current world up object.
  113. */
  114. FbxObject* GetWorldUpObject() const;
  115. /*****************************************************************************************************************************
  116. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  117. *****************************************************************************************************************************/
  118. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  119. protected:
  120. virtual void ConstructProperties(bool pForceSet);
  121. virtual EType GetConstraintType() const;
  122. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  123. };
  124. inline EFbxType FbxTypeOf(const FbxConstraintAim::EWorldUp&){ return eFbxEnum; }
  125. #include <fbxsdk/fbxsdk_nsend.h>
  126. #endif /* _FBXSDK_SCENE_CONSTRAINT_AIM_H_ */