PathConstraintData.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /******************************************************************************
  2. * Spine Runtimes License Agreement
  3. * Last updated May 1, 2019. Replaces all prior versions.
  4. *
  5. * Copyright (c) 2013-2019, Esoteric Software LLC
  6. *
  7. * Integration of the Spine Runtimes into software or otherwise creating
  8. * derivative works of the Spine Runtimes is permitted under the terms and
  9. * conditions of Section 2 of the Spine Editor License Agreement:
  10. * http://esotericsoftware.com/spine-editor-license
  11. *
  12. * Otherwise, it is permitted to integrate the Spine Runtimes into software
  13. * or otherwise create derivative works of the Spine Runtimes (collectively,
  14. * "Products"), provided that each user of the Products must obtain their own
  15. * Spine Editor license and redistribution of the Products in any form must
  16. * include this license and copyright notice.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
  19. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  20. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
  21. * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
  24. * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
  25. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  26. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  27. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *****************************************************************************/
  29. #ifndef Spine_PathConstraintData_h
  30. #define Spine_PathConstraintData_h
  31. #include <spine/PositionMode.h>
  32. #include <spine/SpacingMode.h>
  33. #include <spine/RotateMode.h>
  34. #include <spine/Vector.h>
  35. #include <spine/SpineObject.h>
  36. #include <spine/SpineString.h>
  37. #include <spine/ConstraintData.h>
  38. namespace spine {
  39. class BoneData;
  40. class SlotData;
  41. class SP_API PathConstraintData : public ConstraintData {
  42. friend class SkeletonBinary;
  43. friend class SkeletonJson;
  44. friend class PathConstraint;
  45. friend class Skeleton;
  46. friend class PathConstraintMixTimeline;
  47. friend class PathConstraintPositionTimeline;
  48. friend class PathConstraintSpacingTimeline;
  49. public:
  50. explicit PathConstraintData(const String& name);
  51. Vector<BoneData*>& getBones();
  52. SlotData* getTarget();
  53. void setTarget(SlotData* inValue);
  54. PositionMode getPositionMode();
  55. void setPositionMode(PositionMode inValue);
  56. SpacingMode getSpacingMode();
  57. void setSpacingMode(SpacingMode inValue);
  58. RotateMode getRotateMode();
  59. void setRotateMode(RotateMode inValue);
  60. float getOffsetRotation();
  61. void setOffsetRotation(float inValue);
  62. float getPosition();
  63. void setPosition(float inValue);
  64. float getSpacing();
  65. void setSpacing(float inValue);
  66. float getRotateMix();
  67. void setRotateMix(float inValue);
  68. float getTranslateMix();
  69. void setTranslateMix(float inValue);
  70. private:
  71. Vector<BoneData*> _bones;
  72. SlotData* _target;
  73. PositionMode _positionMode;
  74. SpacingMode _spacingMode;
  75. RotateMode _rotateMode;
  76. float _offsetRotation;
  77. float _position, _spacing, _rotateMix, _translateMix;
  78. };
  79. }
  80. #endif /* Spine_PathConstraintData_h */