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,
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) |
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) |
java.lang.String |
toString() |
addArea, areCoplanar, check, check2DIntersection, check2DTrueIntersection, drawAreas
getColorsBarycenter, getNormal, getPrecedence, getProjectedContour, getProjectedPolyLine, getProvidedNormal, is2D, isBehind, isBehind, isDegenerate, isEqual, isGreaterOrEqual, isLowerOrEqual, isNanOrInf, isNanOrInf, isNegativeOrNull, isNull, isPlanar, isPositiveOrNull, minmax2D, minmax3D, resetDefaultPrecedence, setNormal, setPrecedence
protected java.awt.Stroke stroke
protected java.util.List<ConvexObject> segmentOn
public Segment(Vector3d[] vertices, java.awt.Color[] colors, java.awt.Stroke stroke) throws InvalidPolygonException
InvalidPolygonException
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.Object
public int isBehind(ConvexObject o)
ConvexObject
isBehind
in class ConvexObject
public java.util.List<ConvexObject> breakObject(ConvexObject o)
ConvexObject
breakObject
in class ConvexObject
o
- a ConvexObjectpublic java.util.List<ConvexObject> breakObject(Vector4d v)
ConvexObject
breakObject
in class ConvexObject
v
- plane definitionpublic void draw(java.awt.Graphics2D g2d)
AbstractDrawable3DObject
draw
in class AbstractDrawable3DObject
g2d
- the Graphics2d object where to drawpublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object