Contents
Class Plane
java.lang.Object
eu.mihosoft.vrl.v3d.Plane
Represents a plane in 3D space.
- Author:
- Michael Hoffer <info@michaelhoffer.de>
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
Distance to origin.static final double
EPSILON is the tolerance used bysplitPolygon(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.Normal vector.static final Plane
XY plane.static final Plane
XZ plane.static final Plane
YZ plane. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
static Plane
createFromPoints
(Vector3d a, Vector3d b, Vector3d c) Creates a plane defined by the the specified points.void
flip()
Flips this plane.void
splitPolygon
(Polygon polygon, List<Polygon> coplanarFront, List<Polygon> coplanarBack, List<Polygon> front, List<Polygon> back) Splits aPolygon
by this plane if needed.
-
Field Details
-
EPSILON
public static final double EPSILONEPSILON is the tolerance used bysplitPolygon(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.- See Also:
-
XY_PLANE
XY plane. -
XZ_PLANE
XZ plane. -
YZ_PLANE
YZ plane. -
normal
Normal vector. -
dist
public double distDistance to origin.
-
-
Constructor Details
-
Method Details
-
createFromPoints
-
clone
-
flip
public void flip()Flips this plane. -
splitPolygon
public void splitPolygon(Polygon polygon, List<Polygon> coplanarFront, List<Polygon> coplanarBack, List<Polygon> front, List<Polygon> back) Splits aPolygon
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 eithercoplanarFront
,coplanarBack
depending on their orientation with respect to this plane. Polygons in front or back of this plane go into eitherfront
orback
.- Parameters:
polygon
- polygon to splitcoplanarFront
- "coplanar front" polygonscoplanarBack
- "coplanar back" polygonsfront
- front polygonsback
- back polgons
-