Record Class TextureAtlasLayoutPlan
java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.textureatlas.TextureAtlasLayoutPlan
- Record Components:
pageWidth- final page width in pixelspageHeight- final page height in pixelspageCount- number of pages; one for a current-page resultpageNames- optional complete-atlas page names; empty when no names are requestedplacements- final content rectangles; omitted current-page input IDs become overflowscale- positive finite absolute uniform scale from source coordinates to final pixels; one for complete-atlas authoring, not a multiplier of the previous atlas transform
@CubismEditor({"5.2.03","5.3.02","5.3.03"})
public record TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<String> pageNames, List<TextureAtlasPlacement> placements, double scale)
extends Record
Immutable layout result. Complete-atlas targets require every input; native current-page
targets interpret omitted input IDs as overflow. Coordinates and dimensions are final pixels.
The target's issued constraints, not this factory or constructor, determine which contract
applies. A plan cannot turn a complete-atlas target into a current-page target.
-
Constructor Summary
ConstructorsConstructorDescriptionTextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<TextureAtlasPlacement> placements) TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<String> pageNames, List<TextureAtlasPlacement> placements) Retains the original complete-atlas constructor and its unit scale.TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<String> pageNames, List<TextureAtlasPlacement> placements, double scale) Creates an instance of aTextureAtlasLayoutPlanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextureAtlasLayoutPlancurrentPage(int width, int height, List<TextureAtlasPlacement> placements, double scale) Creates a current-page result with its final uniform scale.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepageCountrecord component.intReturns the value of thepageHeightrecord component.Returns the value of thepageNamesrecord component.intReturns the value of thepageWidthrecord component.Returns the value of theplacementsrecord component.doublescale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextureAtlasLayoutPlan
public TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<String> pageNames, List<TextureAtlasPlacement> placements) Retains the original complete-atlas constructor and its unit scale. -
TextureAtlasLayoutPlan
public TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<TextureAtlasPlacement> placements) -
TextureAtlasLayoutPlan
public TextureAtlasLayoutPlan(int pageWidth, int pageHeight, int pageCount, List<String> pageNames, List<TextureAtlasPlacement> placements, double scale) Creates an instance of aTextureAtlasLayoutPlanrecord class.- Parameters:
pageWidth- the value for thepageWidthrecord componentpageHeight- the value for thepageHeightrecord componentpageCount- the value for thepageCountrecord componentpageNames- the value for thepageNamesrecord componentplacements- the value for theplacementsrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
currentPage
public static TextureAtlasLayoutPlan currentPage(int width, int height, List<TextureAtlasPlacement> placements, double scale) Creates a current-page result with its final uniform scale. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pageWidth
public int pageWidth()Returns the value of thepageWidthrecord component.- Returns:
- the value of the
pageWidthrecord component
-
pageHeight
public int pageHeight()Returns the value of thepageHeightrecord component.- Returns:
- the value of the
pageHeightrecord component
-
pageCount
public int pageCount()Returns the value of thepageCountrecord component.- Returns:
- the value of the
pageCountrecord component
-
pageNames
Returns the value of thepageNamesrecord component.- Returns:
- the value of the
pageNamesrecord component
-
placements
Returns the value of theplacementsrecord component.- Returns:
- the value of the
placementsrecord component
-
scale
public double scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-