源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.1 KiB

  1. /******************************************************************************
  2. * Spine Runtimes Software License v2.5
  3. *
  4. * Copyright (c) 2013-2016, Esoteric Software
  5. * All rights reserved.
  6. *
  7. * You are granted a perpetual, non-exclusive, non-sublicensable, and
  8. * non-transferable license to use, install, execute, and perform the Spine
  9. * Runtimes software and derivative works solely for personal or internal
  10. * use. Without the written permission of Esoteric Software (see Section 2 of
  11. * the Spine Software License Agreement), you may not (a) modify, translate,
  12. * adapt, or develop new applications using the Spine Runtimes or otherwise
  13. * create derivative works or improvements of the Spine Runtimes or (b) remove,
  14. * delete, alter, or obscure any trademarks or any copyright, trademark, patent,
  15. * or other intellectual property or proprietary rights notices on or in the
  16. * Software, including any copy thereof. Redistributions in binary or source
  17. * form must include this license and terms.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
  20. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  21. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  22. * EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
  25. * USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  26. * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  28. * POSSIBILITY OF SUCH DAMAGE.
  29. *****************************************************************************/
  30. using System;
  31. using System.Collections.Generic;
  32. namespace Spine {
  33. /// <summary>Stores the setup pose for an IkConstraint.</summary>
  34. public class IkConstraintData {
  35. internal string name;
  36. internal int order;
  37. internal List<BoneData> bones = new List<BoneData>();
  38. internal BoneData target;
  39. internal int bendDirection = 1;
  40. internal float mix = 1;
  41. /// <summary>The IK constraint's name, which is unique within the skeleton.</summary>
  42. public string Name {
  43. get { return name; }
  44. }
  45. public int Order {
  46. get { return order; }
  47. set { order = value; }
  48. }
  49. /// <summary>The bones that are constrained by this IK Constraint.</summary>
  50. public List<BoneData> Bones {
  51. get { return bones; }
  52. }
  53. /// <summary>The bone that is the IK target.</summary>
  54. public BoneData Target {
  55. get { return target; }
  56. set { target = value; }
  57. }
  58. /// <summary>Controls the bend direction of the IK bones, either 1 or -1.</summary>
  59. public int BendDirection {
  60. get { return bendDirection; }
  61. set { bendDirection = value; }
  62. }
  63. public float Mix { get { return mix; } set { mix = value; } }
  64. public IkConstraintData (string name) {
  65. if (name == null) throw new ArgumentNullException("name", "name cannot be null.");
  66. this.name = name;
  67. }
  68. override public string ToString () {
  69. return name;
  70. }
  71. }
  72. }