[libgdx] Javadoc.

This commit is contained in:
Nathan Sweet 2026-03-25 23:58:43 -04:00
parent bfbc7567a5
commit 2d22a8f6f7
8 changed files with 23 additions and 19 deletions

View File

@ -1702,7 +1702,7 @@ public class Animation {
} }
} }
/** Changes {@link Skeleton#drawOrder}. */ /** Changes the {@link Skeleton#getDrawOrder()}. */
static public class DrawOrderTimeline extends Timeline { static public class DrawOrderTimeline extends Timeline {
static final long propertyID = Property.drawOrder.ordinal(); static final long propertyID = Property.drawOrder.ordinal();
static private final long[] propertyIds = {propertyID}; 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 { static public class DrawOrderFolderTimeline extends Timeline {
private final int[] slots; private final int[] slots;
private final boolean[] inFolder; private final boolean[] inFolder;

View File

@ -37,9 +37,9 @@ import com.badlogic.gdx.utils.Null;
* <ul> * <ul>
* <li>{@link #data}: The setup pose. * <li>{@link #data}: The setup pose.
* <li>{@link #pose}: The unconstrained local pose. Set by animations and application code. * <li>{@link #pose}: The unconstrained local pose. Set by animations and application code.
* <li>{@link #appliedPose}: The constrained local pose. The {@link #pose} with modifications by constraints. * <li>{@link #appliedPose}: The local pose to use for rendering. Possibly modified by constraints.
* <li>World transform (on the applied pose): the {@link #appliedPose} combined with the parent world transform. Computed by * <li>World transform: the local pose combined with the parent world transform. Computed on a pose by
* {@link Skeleton#updateWorldTransform(Physics)} and {@link BonePose#updateWorldTransform(Skeleton)}. * {@link BonePose#updateWorldTransform(Skeleton)} and {@link Skeleton#updateWorldTransform(Physics)}.
* </ul> * </ul>
*/ */
public class Bone extends PosedActive<BoneData, BonePose> { public class Bone extends PosedActive<BoneData, BonePose> {

View File

@ -29,7 +29,7 @@
package com.esotericsoftware.spine; package com.esotericsoftware.spine;
/** Stores the current pose for an IK constraint. */ /** Stores a pose for an IK constraint. */
public class IkConstraintPose implements Pose<IkConstraintPose> { public class IkConstraintPose implements Pose<IkConstraintPose> {
int bendDirection; int bendDirection;
boolean compress, stretch; boolean compress, stretch;

View File

@ -6,7 +6,7 @@ public enum Physics {
/** Physics are not updated or applied. */ /** Physics are not updated or applied. */
none, none,
/** Physics are reset to the current pose. */ /** Physics are {@link PhysicsConstraint#reset() reset}. */
reset, reset,
/** Physics are updated and the pose from physics is applied. */ /** Physics are updated and the pose from physics is applied. */

View File

@ -5,7 +5,7 @@ package com.esotericsoftware.spine;
* <ul> * <ul>
* <li>{@link #data}: The setup pose. * <li>{@link #data}: The setup pose.
* <li>{@link #pose}: The unconstrained pose. Set by animations and application code. * <li>{@link #pose}: The unconstrained pose. Set by animations and application code.
* <li>{@link #appliedPose}: The constrained pose. The {@link #pose} with modifications by constraints. * <li>{@link #appliedPose}: The pose to use for rendering. Possibly modified by constraints.
* </ul> * </ul>
*/ */
abstract public class Posed< // abstract public class Posed< //
@ -13,8 +13,7 @@ abstract public class Posed< //
P extends Pose> { P extends Pose> {
final D data; final D data;
final P pose; final P pose, constrainedPose;
final P constrainedPose;
P appliedPose; P appliedPose;
protected Posed (D data, P pose, P constrainedPose) { protected Posed (D data, P pose, P constrainedPose) {
@ -40,19 +39,19 @@ abstract public class Posed< //
return pose; 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 /** The pose to use for rendering. If no constraints modify this pose, this is the same as {@link #pose}. Otherwise it is a
* {@link #pose} modified by constraints. */ * copy of {@link #pose} modified by constraints. */
public P getAppliedPose () { public P getAppliedPose () {
return appliedPose; return appliedPose;
} }
/** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */ /** Sets the applied pose to the unconstrained pose, for when no constraints will modify the pose. */
void pose () { // Port: usePose void pose () {
appliedPose = pose; appliedPose = pose;
} }
/** Sets the applied pose to the constrained pose, in anticipation of the applied pose being modified by constraints. */ /** 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; appliedPose = constrainedPose;
} }

View File

@ -43,7 +43,10 @@ import com.esotericsoftware.spine.attachments.MeshAttachment;
import com.esotericsoftware.spine.attachments.RegionAttachment; import com.esotericsoftware.spine.attachments.RegionAttachment;
import com.esotericsoftware.spine.utils.SkeletonClipping; 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.
* <p>
* After posing, call {@link #updateWorldTransform(Physics)} to apply constraints and compute world transforms for rendering.
* <p> * <p>
* See <a href="https://esotericsoftware.com/spine-runtime-architecture#Instance-objects">Instance objects</a> in the Spine * See <a href="https://esotericsoftware.com/spine-runtime-architecture#Instance-objects">Instance objects</a> in the Spine
* Runtimes Guide. */ * Runtimes Guide. */
@ -463,7 +466,7 @@ public class Skeleton {
return null; 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 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 size An output value, the width and height of the AABB.
* @param temp Working memory to temporarily store attachments' computed world vertices. */ * @param temp Working memory to temporarily store attachments' computed world vertices. */
@ -471,7 +474,7 @@ public class Skeleton {
getBounds(offset, size, temp, null); 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. * clipping.
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB. * @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 size An output value, the width and height of the AABB.

View File

@ -37,7 +37,7 @@ import com.badlogic.gdx.utils.OrderedSet;
import com.esotericsoftware.spine.attachments.Attachment; import com.esotericsoftware.spine.attachments.Attachment;
import com.esotericsoftware.spine.attachments.MeshAttachment; 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.
* <p> * <p>
* See {@link SkeletonData#defaultSkin}, {@link Skeleton#skin}, and * See {@link SkeletonData#defaultSkin}, {@link Skeleton#skin}, and
* <a href="https://esotericsoftware.com/spine-runtime-skins">Runtime skins</a> in the Spine Runtimes Guide. */ * <a href="https://esotericsoftware.com/spine-runtime-skins">Runtime skins</a> in the Spine Runtimes Guide. */

View File

@ -31,7 +31,9 @@ package com.esotericsoftware.spine.attachments;
import com.badlogic.gdx.utils.Null; 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 { abstract public class Attachment {
final String name; final String name;
@Null Attachment timelineAttachment; @Null Attachment timelineAttachment;