Class GridModel

All Implemented Interfaces:
LXSerializable

public class GridModel extends LXModel
Model of points in a simple grid.
  • Field Details

    • points

      public final GridModel.Point[] points
      Points in the model
    • rows

      public final List<GridModel.Strip> rows
      All the rows in this model
    • columns

      public final List<GridModel.Strip> columns
      All the columns in this model
    • metrics

      public final GridModel.Metrics metrics
      Metrics for the grid
    • width

      public final int width
      Width of the grid
    • height

      public final int height
      Height of the grid
    • xSpacing

      public final float xSpacing
      Spacing on the x-axis
    • ySpacing

      public final float ySpacing
      Spacing on the y-axis
  • Constructor Details

    • GridModel

      public GridModel(GridModel.Metrics metrics)
      Constructs a grid model with the given metrics
      Parameters:
      metrics - Metrics
    • GridModel

      public GridModel(int width, int height)
      Constructs a uniformly spaced grid model of the given size with all pixels apart by a unit of 1.
      Parameters:
      width - Width in pixels
      height - Height in pixels
    • GridModel

      public GridModel(int width, int height, float xSpacing, float ySpacing)
      Constructs a grid model with specified x and y spacing
      Parameters:
      width - Number of nodes in x dimension
      height - Number of nodes in y dimension
      xSpacing - Spacing of nodes in x dimension
      ySpacing - Spacing of nodes in y dimension
  • Method Details