| Modifier and Type | Field and Description |
|---|---|
| private Color | |
| private int | |
| private float | |
| private boolean | |
| private float | |
| private float | |
| private Array | |
| private Vector2 | |
| private Array | |
| private TextureRegion | |
| private int | |
| private Array | |
| public float | |
| public float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| private float[] | Returns: offsetted verticesOffsets polygon to 0 coordinate for ease of calculations, later offset is put back on final render |
| public void | |
| public void | setPolygon(TextureRegion
- region to repeat region, float[] - cw vertices of polygon vertices)Sets polygon with repeating texture region, the size of repeating grid is equal to region size |
| public void | setPolygon(TextureRegion
- region to repeat region, float[] - cw vertices of polygon vertices, float - number of regions per polygon width bound density)Sets polygon with repeating texture region, the size of repeating grid is equal to region size |
| public void | |
| private float[] | snapToGrid(float[] vertices)
This is a garbage, due to Intersector returning values slightly different then the grid values Snapping exactly to grid is important, so that during bulidVertices method, it can be figured out if points is on the wall of it's own grid box or not, to set u/v properly. |
| color | back to summary |
|---|---|
| private Color color | |
| cols | back to summary |
|---|---|
| private int cols | |
| density | back to summary |
|---|---|
| private float density | |
| dirty | back to summary |
|---|---|
| private boolean dirty | |
| gridHeight | back to summary |
|---|---|
| private float gridHeight | |
| gridWidth | back to summary |
|---|---|
| private float gridWidth | |
| indices | back to summary |
|---|---|
| private Array<short[]> indices | |
| offset | back to summary |
|---|---|
| private Vector2 offset | |
| parts | back to summary |
|---|---|
| private Array<float[]> parts | |
| region | back to summary |
|---|---|
| private TextureRegion region | |
| rows | back to summary |
|---|---|
| private int rows | |
| vertices | back to summary |
|---|---|
| private Array<float[]> vertices | |
| x | back to summary |
|---|---|
| public float x | |
| y | back to summary |
|---|---|
| public float y | |
| RepeatablePolygonSprite | back to summary |
|---|---|
| public RepeatablePolygonSprite() | |
| buildVertices | back to summary |
|---|---|
| private void buildVertices() Builds final vertices with vertex attributes like coordinates, color and region u/v | |
| draw | back to summary |
|---|---|
| public void draw(PolygonSpriteBatch batch) | |
| offset | back to summary |
|---|---|
| private float[] offset(float[] vertices) Offsets polygon to 0 coordinate for ease of calculations, later offset is put back on final render
| |
| setColor | back to summary |
|---|---|
public void setColor(Color color)
| |
| setPolygon | back to summary |
|---|---|
| public void setPolygon(TextureRegion region, float[] vertices) Sets polygon with repeating texture region, the size of repeating grid is equal to region size
| |
| setPolygon | back to summary |
|---|---|
| public void setPolygon(TextureRegion region, float[] vertices, float density) Sets polygon with repeating texture region, the size of repeating grid is equal to region size
| |
| setPosition | back to summary |
|---|---|
| public void setPosition(float x, float y) | |
| snapToGrid | back to summary |
|---|---|
| private float[] snapToGrid(float[] vertices) This is a garbage, due to Intersector returning values slightly different then the grid values Snapping exactly to grid is important, so that during bulidVertices method, it can be figured out if points is on the wall of it's own grid box or not, to set u/v properly. Any other implementations are welcome | |