Javadocs. Don't use generics for Sequence#apply.

This commit is contained in:
Nathan Sweet 2021-10-07 22:26:44 -10:00
parent 7155626dc0
commit 02a85972de
3 changed files with 8 additions and 8 deletions

View File

@ -100,8 +100,8 @@ public class MeshAttachment extends VertexAttachment implements HasTextureRegion
return region;
}
/** Calculates {@link #uvs} using the {@link #regionUVs} and {@link #region}. Must be called if the {@link #region},
* {@link #regionUVs}, or the region's properties are changed. */
/** Calculates {@link #uvs} using the {@link #regionUVs} and region. Must be called if the region, the region's properties, or
* the {@link #regionUVs} are changed. */
public void updateRegion () {
float[] regionUVs = this.regionUVs;
if (this.uvs == null || this.uvs.length != regionUVs.length) this.uvs = new float[regionUVs.length];
@ -164,7 +164,7 @@ public class MeshAttachment extends VertexAttachment implements HasTextureRegion
}
}
/** If the attachment has a {@link #sequence}, the {@link #region} may be changed. */
/** If the attachment has a {@link #sequence}, the region may be changed. */
public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset, int stride) {
if (sequence != null) sequence.apply(slot, this);
super.computeWorldVertices(slot, start, count, worldVertices, offset, stride);

View File

@ -78,8 +78,8 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
sequence = new Sequence(sequence);
}
/** Calculates the {@link #offset} and {@link #uvs} using the {@link #region} and the attachment's transform. Must be called if
* the {@link #region}, transform, or the region's properties are changed. */
/** Calculates the {@link #offset} and {@link #uvs} using the region and the attachment's transform. Must be called if the
* region, the region's properties, or the transform are changed. */
public void updateRegion () {
float width = getWidth();
float height = getHeight();
@ -161,8 +161,8 @@ public class RegionAttachment extends Attachment implements HasTextureRegion {
return region;
}
/** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the
* {@link #region} may be changed.
/** Transforms the attachment's four vertices to world coordinates. If the attachment has a {@link #sequence}, the region may
* be changed.
* <p>
* See <a href="http://esotericsoftware.com/spine-runtime-skeletons#World-transforms">World transforms</a> in the Spine
* Runtimes Guide.

View File

@ -56,7 +56,7 @@ public class Sequence {
setupIndex = other.setupIndex;
}
public <T extends Attachment & HasTextureRegion> void apply (Slot slot, T attachment) {
public void apply (Slot slot, HasTextureRegion attachment) {
int index = slot.getSequenceIndex();
if (index == -1) index = setupIndex;
if (index >= regions.length) index = regions.length - 1;