public class GridModel extends LXModel
Modifier and Type | Class and Description |
---|---|
static class |
GridModel.Metrics |
static class |
GridModel.Point |
class |
GridModel.Strip |
LXModel.Key, LXModel.Listener
LXSerializable.Utils
Modifier and Type | Field and Description |
---|---|
List<GridModel.Strip> |
columns
All the columns in this model
|
int |
height
Height of the grid
|
GridModel.Metrics |
metrics
Metrics for the grid
|
GridModel.Point[] |
points
Points in the model
|
List<GridModel.Strip> |
rows
All the rows in this model
|
int |
width
Width of the grid
|
float |
xSpacing
Spacing on the x-axis
|
float |
ySpacing
Spacing on the y-axis
|
Constructor and Description |
---|
GridModel(GridModel.Metrics metrics)
Constructs a grid model with the given metrics
|
GridModel(int width,
int height)
Constructs a uniformly spaced grid model of the given size with all pixels
apart by a unit of 1.
|
GridModel(int width,
int height,
float xSpacing,
float ySpacing)
Constructs a grid model with specified x and y spacing
|
Modifier and Type | Method and Description |
---|---|
GridModel.Point |
getPoint(int x,
int y) |
addListener, bang, children, dispose, getGeneration, getParent, getPath, getPoints, load, meta, normalizePoints, reindexPoints, removeListener, save, sub, toIndexBuffer, toIndexBuffer, update, update, update
public final GridModel.Point[] points
public final List<GridModel.Strip> rows
public final List<GridModel.Strip> columns
public final GridModel.Metrics metrics
public final int width
public final int height
public final float xSpacing
public final float ySpacing
public GridModel(GridModel.Metrics metrics)
metrics
- Metricspublic GridModel(int width, int height)
width
- Width in pixelsheight
- Height in pixelspublic GridModel(int width, int height, float xSpacing, float ySpacing)
width
- Number of nodes in x dimensionheight
- Number of nodes in y dimensionxSpacing
- Spacing of nodes in x dimensionySpacing
- Spacing of nodes in y dimensionpublic GridModel.Point getPoint(int x, int y)
LX library by Mark C. Slee. © 2012-2020