public class Poly2D extends Poly
Batchable.FixedSizeBatchable| Modifier and Type | Field and Description |
|---|---|
float |
rotation |
| Constructor and Description |
|---|
Poly2D() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
apply(float[] vertices,
int vertexStartingIndex,
AttributeOffsets offsets,
int vertexSize)
Called by FlexBatch.
|
Poly2D |
color(com.badlogic.gdx.graphics.Color color) |
Poly2D |
color(float floatBits) |
Poly2D |
color(float r,
float g,
float b,
float a) |
protected boolean |
isPosition3D()
Determines whether the position data has a Z component.
|
protected boolean |
isTextureCoordinate3D()
Determines whether the texture coordinate data has a third component (for TextureArray layers).
|
Poly2D |
origin(float originX,
float originY)
Sets the center point for transformations (rotation and scale).
|
Poly2D |
position(float x,
float y)
Sets the position of the bottom left of the texture region in world space.
|
Poly2D |
position(com.badlogic.gdx.math.Vector2 position)
Sets the position of the bottom left of the texture region in world space.
|
protected void |
prepareSharedContext(RenderContextAccumulator renderContext)
Prepares the rendering context for this type of Batchable to be drawn.
|
void |
refresh()
Resets the state and default parameters of the Batchable so it can be reused for an entirely new image.
|
Poly2D |
region(com.badlogic.gdx.graphics.g2d.PolygonRegion region)
Sets the polygon region.
|
Poly2D |
rotation(float rotation) |
Poly2D |
scale(float scaleX,
float scaleY) |
Poly2D |
size(float width,
float height) |
addVertexAttributes, apply, getNumberOfTextures, prepareContext, resetprotected boolean isPosition3D()
PolyOverriding this method will produce a subclass that is incompatible with a FlexBatch that was instantiated for the superclass type.
isPosition3D in class Polyprotected boolean isTextureCoordinate3D()
PolyOverriding this method will produce a subclass that is incompatible with a FlexBatch that was instantiated for the superclass type.
isTextureCoordinate3D in class Polyprotected void prepareSharedContext(RenderContextAccumulator renderContext)
Batchablebegin(),
executeChanges(), or end() on
renderContext, as these are handled by the FlexBatch. It should not change anything in a way that is unique to any
particular instance of this Batchable type.prepareSharedContext in class BatchablerenderContext - The FlexBatch's manager of GL state changes and texture bindings.public void refresh()
Batchablepublic Poly2D position(float x, float y)
public Poly2D position(com.badlogic.gdx.math.Vector2 position)
public Poly2D rotation(float rotation)
protected int apply(float[] vertices,
int vertexStartingIndex,
AttributeOffsets offsets,
int vertexSize)
Batchableapply in class Polyoffsets - The offsets of the vertex attributes.vertexSize - The size of a vertex in floats.Batchable.FixedSizeBatchable, as it is
assumed to match Batchable.FixedSizeBatchable.getVerticesPerBatchable().public Poly2D region(com.badlogic.gdx.graphics.g2d.PolygonRegion region)
Poly