fbxconstraintscale.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 fbxconstraintscale.h
  9. #ifndef _FBXSDK_SCENE_CONSTRAINT_SCALE_H_
  10. #define _FBXSDK_SCENE_CONSTRAINT_SCALE_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 scale constraint.
  15. * A scale constraint lets you constrain the scale of an object based on the scale of one or more sources.
  16. * \nosubgrouping
  17. */
  18. class FBXSDK_DLL FbxConstraintScale : public FbxConstraint
  19. {
  20. FBXSDK_OBJECT_DECLARE(FbxConstraintScale,FbxConstraint);
  21. public:
  22. /**
  23. * \name Properties
  24. */
  25. //@{
  26. /** This property handles whether to affect x axis.
  27. * Default value is true.
  28. */
  29. FbxPropertyT<FbxBool> AffectX;
  30. /** This property handles whether to affect y axis.
  31. * Default value is true.
  32. */
  33. FbxPropertyT<FbxBool> AffectY;
  34. /** This property handles whether to affect z axis.
  35. * Default value is true.
  36. */
  37. FbxPropertyT<FbxBool> AffectZ;
  38. /** This property handles scaling offset.
  39. * Default value is (0, 0, 0).
  40. */
  41. FbxPropertyT<FbxDouble3> Scaling;
  42. /** This property handles constraint source objects.
  43. */
  44. FbxPropertyT<FbxReference> ConstraintSources;
  45. /** This property handles constraint target objects.
  46. */
  47. FbxPropertyT<FbxReference> ConstrainedObject;
  48. //@}
  49. /** Add a source to the constraint.
  50. * \param pObject New source object.
  51. * \param pWeight Weight of the source object.
  52. */
  53. void AddConstraintSource(FbxObject* pObject, double pWeight = 100);
  54. /** Retrieve the constraint source count.
  55. * \return Current constraint source count.
  56. */
  57. int GetConstraintSourceCount() const;
  58. /** Retrieve a constraint source object.
  59. * \param pIndex Index of the source
  60. * \return Current source at the specified index.
  61. */
  62. FbxObject* GetConstraintSource(int pIndex) const;
  63. /** Set the constrained object.
  64. * \param pObject The constrained object.
  65. */
  66. void SetConstrainedObject(FbxObject* pObject);
  67. /** Retrieve the constrained object.
  68. * \return Current constrained object.
  69. */
  70. FbxObject* GetConstrainedObject() const;
  71. /*****************************************************************************************************************************
  72. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  73. *****************************************************************************************************************************/
  74. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  75. protected:
  76. virtual void ConstructProperties(bool pForceSet);
  77. virtual EType GetConstraintType() const;
  78. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  79. };
  80. #include <fbxsdk/fbxsdk_nsend.h>
  81. #endif /* _FBXSDK_SCENE_CONSTRAINT_SCALE_H_ */