Most visited

Recently visited

Polyline

public class Polyline
extends Geometry

java.lang.Object
   ↳ com.viro.core.Geometry
     ↳ com.viro.core.Polyline


Polyline defines a multi-point line.

Summary

Public constructors

Polyline(float thickness)

Construct a new Polyline with no points.

Polyline(List<Vector> points, float thickness)

Construct a new Polyline composed of the given points, with the provided thickness.

Public methods

void appendPoint(Vector point)

Append the given point to this Polyline.

void dispose()

Release native resources associated with this Polyline.

List<Vector> getPoints()

Get the points in this Polyline.

float getThickness()

Get the thickness of this Polyline.

void setPoints(List<Vector> points)

Set the points that compose this Polyline.

void setThickness(float thickness)

Set the thickness of this Polyline.

Public constructors

Polyline

Polyline (float thickness)

Construct a new Polyline with no points. Points may be added via setPoints(List) or appendPoint(Vector).

Parameters
thickness float: The thickness of the Polyline.

Polyline

Polyline (List<Vector> points, 
                float thickness)

Construct a new Polyline composed of the given points, with the provided thickness.

Parameters
points List: The points that will make up the Polyline.

thickness float: The thickness of the Polyline.

Public methods

appendPoint

void appendPoint (Vector point)

Append the given point to this Polyline.

Parameters
point Vector: The point to append.

dispose

void dispose ()

Release native resources associated with this Polyline.

getPoints

List<Vector> getPoints ()

Get the points in this Polyline.

Returns
List<Vector> The points, each in a Vector.

getThickness

float getThickness ()

Get the thickness of this Polyline.

Returns
float The thickness.

setPoints

void setPoints (List<Vector> points)

Set the points that compose this Polyline. This will reconstruct the Polyline. To add one point at a time, it is faster to use appendPoint(Vector).

Parameters
points List: The points to set.

setThickness

void setThickness (float thickness)

Set the thickness of this Polyline.

Parameters
thickness float: The thickness.

Hooray!