public class Plane
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static double |
EPSILON
EPSILON is the tolerance used by
splitPolygon(eu.mihosoft.vrl.v3d.Polygon, java.util.List, java.util.List, java.util.List, java.util.List)
to decide if a point is on the plane. |
static double |
EPSILON_Point |
static Plane |
XY_PLANE
XY plane.
|
static Plane |
XZ_PLANE
XZ plane.
|
static Plane |
YZ_PLANE
YZ plane.
|
| Constructor and Description |
|---|
Plane(Vector3d normal,
double dist)
Constructor.
|
Plane(Vector3d normal,
java.util.List<Vertex> vertices)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Plane |
clone() |
static Vector3d |
computeNormal(java.util.List<Vertex> vertices) |
static Plane |
createFromPoints(java.util.List<Vertex> vertices)
Creates a plane defined by the the specified points.
|
void |
flip()
Flips this plane.
|
static IPolygonDebugger |
getDebugger() |
double |
getDist() |
static double |
getEPSILON() |
Vector3d |
getNormal() |
static boolean |
isUseDebugger() |
static void |
setDebugger(IPolygonDebugger debugger) |
void |
setDist(double dist) |
static void |
setEPSILON(double ePSILON) |
void |
setNormal(Vector3d normal) |
static void |
setUseDebugger(boolean useDebugger) |
void |
splitPolygon(Polygon polygon,
java.util.List<Polygon> coplanarFront,
java.util.List<Polygon> coplanarBack,
java.util.List<Polygon> front,
java.util.List<Polygon> back)
Splits a
Polygon by this plane if needed. |
void |
transformPlane(Transform transform_in,
Vector3d a) |
public static double EPSILON
splitPolygon(eu.mihosoft.vrl.v3d.Polygon, java.util.List, java.util.List, java.util.List, java.util.List)
to decide if a point is on the plane. public static final double EPSILON =
0.00000001;public static double EPSILON_Point
public static final Plane XY_PLANE
public static final Plane XZ_PLANE
public static final Plane YZ_PLANE
public Plane(Vector3d normal, double dist)
normal - plane normaldist - distance from originpublic static Plane createFromPoints(java.util.List<Vertex> vertices)
a - first pointb - second pointc - third pointpublic Plane clone()
clone in class java.lang.Objectpublic void flip()
public void splitPolygon(Polygon polygon, java.util.List<Polygon> coplanarFront, java.util.List<Polygon> coplanarBack, java.util.List<Polygon> front, java.util.List<Polygon> back)
Polygon by this plane if needed. After that it puts the
polygons or the polygon fragments in the appropriate lists (front,
back). Coplanar polygons go into either coplanarFront,
coplanarBack depending on their orientation with respect to this
plane. Polygons in front or back of this plane go into either front
or back.polygon - polygon to splitcoplanarFront - "coplanar front" polygonscoplanarBack - "coplanar back" polygonsfront - front polygonsback - back polgonspublic static IPolygonDebugger getDebugger()
public static void setDebugger(IPolygonDebugger debugger)
public static boolean isUseDebugger()
public static void setUseDebugger(boolean useDebugger)
public Vector3d getNormal()
public void setNormal(Vector3d normal)
public double getDist()
public void setDist(double dist)
public static double getEPSILON()
public static void setEPSILON(double ePSILON)