public abstract class ConvexObject extends AbstractDrawable3DObject
Constructor and Description |
---|
ConvexObject(Vector3d[] vertices,
java.awt.Color[] colors)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addArea(ConvexObject co) |
boolean |
areCoplanar(ConvexObject o)
Test the coplanarity of two objects
|
abstract java.util.List<ConvexObject> |
breakObject(ConvexObject o)
Abstract method
Break this ConvexObject against the ConvexObject o
|
abstract java.util.List<ConvexObject> |
breakObject(Vector4d v)
Abstract method
Break this ConvexObject against a plane
|
protected int |
check(ConvexObject o,
Vector3d v)
Check the intersection this and o against vector v.
|
boolean |
check2DIntersection(ConvexObject o)
Check the intersections of the projection on the xOy-plane of this and o
The algorithm is the following: for each edge, determinate the normal vector and project all the points
of this and o on the normal.
|
boolean |
check2DTrueIntersection(ConvexObject o)
Check the intersections of the projection on the xOy-plane of this and o
The algorithm is the following: for each edge, determinate the normal vector and project all the points
of this and o on the normal.
|
protected void |
drawAreas(java.awt.Graphics2D g2d) |
int |
isBehind(ConvexObject o)
Check if o is behind this.
|
draw, getColorsBarycenter, getNormal, getPrecedence, getProjectedContour, getProjectedPolyLine, getProvidedNormal, is2D, isBehind, isBehind, isDegenerate, isEqual, isGreaterOrEqual, isLowerOrEqual, isNanOrInf, isNanOrInf, isNegativeOrNull, isNull, isPlanar, isPositiveOrNull, minmax2D, minmax3D, resetDefaultPrecedence, setNormal, setPrecedence
public ConvexObject(Vector3d[] vertices, java.awt.Color[] colors) throws InvalidPolygonException
vertices
- the verticescolors
- the colorsInvalidPolygonException
public abstract java.util.List<ConvexObject> breakObject(ConvexObject o)
o
- a ConvexObjectpublic abstract java.util.List<ConvexObject> breakObject(Vector4d v)
v
- plane definitionpublic void addArea(ConvexObject co)
protected void drawAreas(java.awt.Graphics2D g2d)
public boolean areCoplanar(ConvexObject o)
o
- a ConvexObjectpublic int isBehind(ConvexObject o)
public boolean check2DIntersection(ConvexObject o)
o
- the object to test with thispublic boolean check2DTrueIntersection(ConvexObject o)
o
- the object to test with thisprotected int check(ConvexObject o, Vector3d v)
v
- the vector where to project