public class Segment extends ConvexObject implements java.lang.Comparable<Segment>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<ConvexObject> |
segmentOn |
protected java.awt.Stroke |
stroke |
| Constructor and Description |
|---|
Segment(Vector3d[] vertices,
java.awt.Color[] colors) |
Segment(Vector3d[] vertices,
java.awt.Color[] colors,
java.awt.Stroke stroke) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConvexObject(ConvexObject co) |
java.util.List<ConvexObject> |
breakObject(ConvexObject o)
Abstract method
Break this ConvexObject against the ConvexObject o
|
java.util.List<Segment> |
breakObject(Vector3d p,
Vector3d u,
Vector3d n) |
java.util.List<ConvexObject> |
breakObject(Vector4d v)
Abstract method
Break this ConvexObject against a plane
|
int |
compareTo(Segment o) |
void |
draw(java.awt.Graphics2D g2d)
Draw this object on a Graphics2D object
|
boolean |
equals(java.lang.Object o) |
double |
getLength() |
static double |
getLength(Vector3d[] vertices) |
int |
hashCode() |
int |
isBehind(ConvexObject o)
Check if o is behind this.
|
boolean |
isIn2D() |
boolean |
isInFront() |
void |
removeConvexObject(ConvexObject co) |
void |
replaceSegment(java.util.List<Segment> segs) |
void |
setStroke(java.awt.Stroke stroke) |
java.lang.String |
toString() |
addArea, areCoplanar, check, check2DIntersection, check2DTrueIntersection, drawAreasgetColorsBarycenter, getNormal, getPrecedence, getProjectedContour, getProjectedPolyLine, getProvidedNormal, is2D, isBehind, isBehind, isDegenerate, isEqual, isGreaterOrEqual, isLowerOrEqual, isMonochromatic, isNanOrInf, isNanOrInf, isNegativeOrNull, isNull, isPlanar, isPositiveOrNull, minmax2D, minmax3D, resetDefaultPrecedence, setNormal, setPrecedenceprotected java.awt.Stroke stroke
protected java.util.List<ConvexObject> segmentOn
public Segment(Vector3d[] vertices, java.awt.Color[] colors, java.awt.Stroke stroke) throws InvalidPolygonException
InvalidPolygonExceptionpublic Segment(Vector3d[] vertices, java.awt.Color[] colors) throws InvalidPolygonException
InvalidPolygonExceptionpublic void setStroke(java.awt.Stroke stroke)
public double getLength()
public static double getLength(Vector3d[] vertices)
public void addConvexObject(ConvexObject co)
public void removeConvexObject(ConvexObject co)
public void replaceSegment(java.util.List<Segment> segs)
public boolean isIn2D()
public boolean isInFront()
public int compareTo(Segment o)
compareTo in interface java.lang.Comparable<Segment>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int isBehind(ConvexObject o)
ConvexObjectisBehind in class ConvexObjectpublic java.util.List<ConvexObject> breakObject(ConvexObject o)
ConvexObjectbreakObject in class ConvexObjecto - a ConvexObjectpublic java.util.List<ConvexObject> breakObject(Vector4d v)
ConvexObjectbreakObject in class ConvexObjectv - plane definitionpublic void draw(java.awt.Graphics2D g2d)
AbstractDrawable3DObjectdraw in class AbstractDrawable3DObjectg2d - the Graphics2d object where to drawpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object