|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.Polyline
A Polyline is a line strip in world space. You can add a Polyline to a world
and it will be rendered after all objects have been drawn.
This doesn't work for the software renderer.
When using a multi-threaded renderer, make sure to synchronize updates to the
line with the rendering.
Constructor Summary | |
Polyline(SimpleVector[] points,
java.awt.Color color)
Creates a new, static Polyline. |
Method Summary | |
java.awt.Color |
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(java.awt.Color 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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Polyline(SimpleVector[] points, java.awt.Color color)
points
- The coordinates in world spacecolor
- The colorMethod Detail |
public void update(SimpleVector[] newPoints)
newPoints
- the new pointspublic int getLength()
public void setColor(java.awt.Color color)
color
- the colorpublic java.awt.Color 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |