public class Polygon extends AbstractShape
color, label, material
Constructor and Description |
---|
Polygon(Vector3d... points)
Ein Polygon, das über die Punkte definiert ist, die im Konstruktor übergeben werden.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(Vector3d point)
Fügt dem Polygon einen neuen Punkt am Ende der Liste hinzu.
|
void |
fill(boolean fill)
Ob das Polygon gefüllt oder im Wireframe-Modus gezeichnet werden soll.
|
DisplayList |
getDisplayList(DisplayList list) |
DisplayList |
getDisplayList(DisplayList list,
Transformation transformation) |
void |
removePoint(int index)
Entfernt einen Eckpunkt aus dem Polygon.
|
protected java.util.List<Triangle> |
tesselatePolygon()
Berechnet die Triangulation des Polygons.
|
getAnimation, getColor, getLabel, getMaterial, getNode, hit, setAnimation, setColor, setMaterial, setNode, update
public Polygon(Vector3d... points)
points
- die Eckpunkte des Polygonspublic void addPoint(Vector3d point)
point
- der neue Eckpunktpublic void removePoint(int index)
index
- der Index des Punktes, der entfernt werden sollprotected java.util.List<Triangle> tesselatePolygon()
public void fill(boolean fill)
fill
- true, wenn Polygon gefüllt werden sollpublic DisplayList getDisplayList(DisplayList list)
getDisplayList
in interface Renderable
getDisplayList
in class AbstractShape
public DisplayList getDisplayList(DisplayList list, Transformation transformation)
getDisplayList
in interface Renderable
getDisplayList
in class AbstractShape