Package renderer.models_L
Class GRSModel
- java.lang.Object
-
- renderer.scene.Model
-
- renderer.models_L.GRSModel
-
public class GRSModel extends Model
Create a wirefram model from a GRS file.GRS files are a simple file format for describing two-dimensional drawings made up of "polylines". The format was created for the textbook "Computer Graphics Using OpenGL", 3rd Ed, by Francis S Hill and Stephen M Kelley (see pages 61-63).
See https://en.wikipedia.org/wiki/Polyline
The structure of a GRS file is:
- A number of comment lines followed by a line
starting with an asterisk,
'*'
. - A line containing the "extent" (bounding box) of the drawing given as four doubles in model coordinates (left, top, right, bottom).
- The number of line-strips (i.e., polylines) in the drawing.
- The list of line-strips. Each line-strip starts with the number of vertices in the line-strip, followed by the (x, y) model coordinates for each vertex.
- A number of comment lines followed by a line
starting with an asterisk,
-
-
Field Summary
Fields Modifier and Type Field Description double
bottom
double
left
int
numLineStrips
double
right
double
top
-
Fields inherited from class renderer.scene.Model
colorList, name, primitiveList, vertexList, visible
-
-
-
-
Field Detail
-
left
public double left
-
top
public double top
-
right
public double right
-
bottom
public double bottom
-
numLineStrips
public int numLineStrips
-
-