diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index 5ff6de7c2..c5ca2a35d 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -1702,7 +1702,7 @@ public class Animation { } } - /** Changes {@link Skeleton#drawOrder}. */ + /** Changes the {@link Skeleton#getDrawOrder()}. */ static public class DrawOrderTimeline extends Timeline { static final long propertyID = Property.drawOrder.ordinal(); static private final long[] propertyIds = {propertyID}; @@ -1752,7 +1752,7 @@ public class Animation { } } - /** Changes a subset of {@link Skeleton#drawOrder}. */ + /** Changes a subset of the {@link Skeleton#getDrawOrder() draw order}. */ static public class DrawOrderFolderTimeline extends Timeline { private final int[] slots; private final boolean[] inFolder; diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java index f8ee64e97..8d9ce7d60 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Bone.java @@ -37,9 +37,9 @@ import com.badlogic.gdx.utils.Null; * */ public class Bone extends PosedActive { diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintPose.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintPose.java index f1984b222..d2ec086ea 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintPose.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/IkConstraintPose.java @@ -29,7 +29,7 @@ package com.esotericsoftware.spine; -/** Stores the current pose for an IK constraint. */ +/** Stores a pose for an IK constraint. */ public class IkConstraintPose implements Pose { int bendDirection; boolean compress, stretch; diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Physics.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Physics.java index 7759e888d..b1955cddf 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Physics.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Physics.java @@ -6,7 +6,7 @@ public enum Physics { /** Physics are not updated or applied. */ none, - /** Physics are reset to the current pose. */ + /** Physics are {@link PhysicsConstraint#reset() reset}. */ reset, /** Physics are updated and the pose from physics is applied. */ diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java index ec64f2163..38b732c48 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Posed.java @@ -5,7 +5,7 @@ package com.esotericsoftware.spine; * */ abstract public class Posed< // @@ -13,8 +13,7 @@ abstract public class Posed< // P extends Pose> { final D data; - final P pose; - final P constrainedPose; + final P pose, constrainedPose; P appliedPose; protected Posed (D data, P pose, P constrainedPose) { @@ -40,19 +39,19 @@ abstract public class Posed< // return pose; } - /** If no constraints modify this object, the applied pose is the same as the {@link #pose}. Otherwise it is a copy of the - * {@link #pose} modified by constraints. */ + /** The pose to use for rendering. If no constraints modify this pose, this is the same as {@link #pose}. Otherwise it is a + * copy of {@link #pose} modified by constraints. */ public P getAppliedPose () { return appliedPose; } /** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */ - void pose () { // Port: usePose + void pose () { appliedPose = pose; } /** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */ - void constrained () { // Port: useConstrained + void constrained () { appliedPose = constrainedPose; } diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java index 0f2af71a9..5c3d7acff 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skeleton.java @@ -43,7 +43,10 @@ import com.esotericsoftware.spine.attachments.MeshAttachment; import com.esotericsoftware.spine.attachments.RegionAttachment; import com.esotericsoftware.spine.utils.SkeletonClipping; -/** Stores the current pose for a skeleton. +/** Stores bones and slots to be posed by animations and application code. Multiple skeleton instances can share the same + * {@link SkeletonData}, including animations, attachments, and skins. + *

+ * After posing, call {@link #updateWorldTransform(Physics)} to apply constraints and compute world transforms for rendering. *

* See Instance objects in the Spine * Runtimes Guide. */ @@ -463,7 +466,7 @@ public class Skeleton { return null; } - /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose. * @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB. * @param size An output value, the width and height of the AABB. * @param temp Working memory to temporarily store attachments' computed world vertices. */ @@ -471,7 +474,7 @@ public class Skeleton { getBounds(offset, size, temp, null); } - /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. Optionally applies + /** Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the applied pose. Optionally applies * clipping. * @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB. * @param size An output value, the width and height of the AABB. diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java index 45ec90bad..f4b203a4c 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java @@ -37,7 +37,7 @@ import com.badlogic.gdx.utils.OrderedSet; import com.esotericsoftware.spine.attachments.Attachment; import com.esotericsoftware.spine.attachments.MeshAttachment; -/** Stores attachments by slot index and placeholder name. +/** Stores attachments by slot index and placeholder name. Multiple {@link Skeleton} instances can use the same skins. *

* See {@link SkeletonData#defaultSkin}, {@link Skeleton#skin}, and * Runtime skins in the Spine Runtimes Guide. */ diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java index 4f0f464a4..84c06a571 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/Attachment.java @@ -31,7 +31,9 @@ package com.esotericsoftware.spine.attachments; import com.badlogic.gdx.utils.Null; -/** The base class for all attachments. */ +import com.esotericsoftware.spine.Skeleton; + +/** The base class for all attachments. Multiple {@link Skeleton} instances, slots, or skins can use the same attachments. */ abstract public class Attachment { final String name; @Null Attachment timelineAttachment;