public class PolyLine extends ConvexObject
Modifier and Type | Field and Description |
---|---|
protected double[] |
clip |
Constructor and Description |
---|
PolyLine(Vector3d[] vertices,
java.awt.Color[] colors,
G2DStroke stroke)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.List<ConvexObject> |
breakObject(ConvexObject o)
Abstract method
Break this ConvexObject against the ConvexObject o
|
java.util.List<ConvexObject> |
breakObject(Vector4d v)
Break this ConvexObject against a plane
|
void |
draw(java.awt.Graphics2D g2d)
Draw this object on a Graphics2D object
|
Vector3d |
getNormal()
Get the normal vector.
|
static java.util.List<PolyLine> |
getPolyLines(Vector3d[] vertices,
java.awt.Color[] colors,
G2DStroke stroke,
boolean loop)
Get a set of polylines.
|
protected boolean |
isDegenerate() |
protected boolean |
isNanOrInf() |
protected boolean |
isPlanar()
Determinates if the object is contained into a plane
|
addArea, areCoplanar, check, check2DIntersection, check2DTrueIntersection, drawAreas, isBehind
getClip, getColorsBarycenter, getPrecedence, getProjectedContour, getProjectedPolyLine, getProvidedNormal, isBehind, isBehind, isEqual, isGreaterOrEqual, isLowerOrEqual, isMonochromatic, isNanOrInf, isNegativeOrNull, isNull, isPositiveOrNull, makeClip, minmax2D, minmax3D, resetDefaultPrecedence, setNormal, setPrecedence
public PolyLine(Vector3d[] vertices, java.awt.Color[] colors, G2DStroke stroke) throws InvalidPolygonException
vertices
- the polyline verticescolors
- the vertices colorstroke
- the stroke to usedInvalidPolygonException
public static java.util.List<PolyLine> getPolyLines(Vector3d[] vertices, java.awt.Color[] colors, G2DStroke stroke, boolean loop)
vertices
- the polyline verticescolors
- the vertices colorstroke
- the stroke to usedloop
- if true a looping polyline is createdpublic java.util.List<ConvexObject> breakObject(Vector4d v)
breakObject
in interface Clippable
breakObject
in class ConvexObject
v
- plane definitionpublic java.util.List<ConvexObject> breakObject(ConvexObject o)
breakObject
in class ConvexObject
o
- a ConvexObjectprotected boolean isDegenerate()
isDegenerate
in class AbstractDrawable3DObject
protected boolean isNanOrInf()
isNanOrInf
in class AbstractDrawable3DObject
public Vector3d getNormal()
getNormal
in class AbstractDrawable3DObject
protected boolean isPlanar()
isPlanar
in class AbstractDrawable3DObject
public void draw(java.awt.Graphics2D g2d)
AbstractDrawable3DObject
draw
in class AbstractDrawable3DObject
g2d
- the Graphics2d object where to draw