-
Notifications
You must be signed in to change notification settings - Fork 0
LineString
MisterCavespider edited this page Jun 3, 2017
·
2 revisions
A LineString
is a list of lines with a variable length. This means you can keep adding points, and the line will stretch!
To prevent the string becoming too long, the user can set a value called maxSize
. If there are more points than allowed, the LineString
will start removing points, beginning with those which have been in the list the longest.
To use a LineString
, you must first create an instance of it, then put it in a Geometry
. Adding points (as of right now, you can't modify points already in the list) can be done using setPoint(Vector3f, ColorRGBA)
. The maxSize
can be set using setMaxSize(int)
.
LineString str = new LineString(64);
Geometry geom = new Geometry("LineString", str);
...
str.addPoint(Vector3f.ZERO, ColorRGBA.Red);