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 TypeFieldDescriptiondoubleDistance to origin.static final doubleEPSILON 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 PlaneXY plane.static final PlaneXZ plane.static final PlaneYZ plane. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static PlanecreateFromPoints(Vector3d a, Vector3d b, Vector3d c) Creates a plane defined by the the specified points.voidflip()Flips this plane.voidsplitPolygon(Polygon polygon, List<Polygon> coplanarFront, List<Polygon> coplanarBack, List<Polygon> front, List<Polygon> back) Splits aPolygonby 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
-
Plane
Constructor. Creates a new plane defined by its normal vector and the distance to the origin.- Parameters:
normal- plane normaldist- distance from origin
-
-
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 aPolygonby 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,coplanarBackdepending on their orientation with respect to this plane. Polygons in front or back of this plane go into eitherfrontorback.- Parameters:
polygon- polygon to splitcoplanarFront- "coplanar front" polygonscoplanarBack- "coplanar back" polygonsfront- front polygonsback- back polgons
-