public class Polyline
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Polyline(SimpleVector[] points,
RGBColor color)
Creates a new, static Polyline.
|
Modifier and Type | Method and Description |
---|---|
RGBColor |
getColor()
Returns the color of the line strip.
|
int |
getLength()
Returns the length of the line strip.
|
Object3D |
getParent()
Returns the parent object.
|
float |
getPercentage()
Returns the percentage (a value between 0 and 1 that defines how much of
the line is actually visible).
|
int |
getTransparencyMode()
Returns the current transparency mode.
|
float |
getWidth()
Returns the line width.
|
boolean |
isPointMode()
Are we in point mode?
|
boolean |
isVisible()
Returns the visibility of the line.
|
void |
setColor(RGBColor color)
Sets the color of the line strip.
|
void |
setParent(Object3D obj)
Sets a parent object.
|
void |
setPercentage(float percentage)
Sets a value between 0 and 1 that defines how much of the line is
actually visible. 0 means nothing, 1 means fully visible.
|
void |
setPointMode(boolean pointMode)
If set to true, points will be drawn instead of lines.
|
void |
setTransparencyMode(int transparencyMode)
Sets the transparency mode analog to the setter in Object3D (i.e. it uses
the same constants).
|
void |
setVisible(boolean visible)
Sets the visibility of the line.
|
void |
setWidth(float width)
Sets the line width.
|
void |
update(SimpleVector[] newPoints)
Updates the line strip.
|
public Polyline(SimpleVector[] points, RGBColor color)
points
- The coordinates in world spacecolor
- The colorpublic void update(SimpleVector[] newPoints)
newPoints
- the new pointspublic int getLength()
public void setColor(RGBColor color)
color
- the colorpublic RGBColor getColor()
public void setWidth(float width)
width
- the widthpublic float getWidth()
public void setTransparencyMode(int transparencyMode)
transparencyMode
- the modepublic int getTransparencyMode()
public void setPercentage(float percentage)
percentage
- the percentage, 1 is default.public float getPercentage()
public void setVisible(boolean visible)
visible
- visible or not?public boolean isVisible()
public void setPointMode(boolean pointMode)
pointMode
- draw points? Default is false (which means lines).public boolean isPointMode()
public void setParent(Object3D obj)
obj
- the parent objectpublic Object3D getParent()