Package eu.mihosoft.vrl.v3d
Class Plane
java.lang.Object
eu.mihosoft.vrl.v3d.Plane
Represents a plane in 3D space.
- Author:
- Michael Hoffer <info@michaelhoffer.de>
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier 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- 
EPSILONpublic 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_PLANEXY plane.
- 
XZ_PLANEXZ plane.
- 
YZ_PLANEYZ plane.
- 
normalNormal vector.
- 
distpublic double distDistance to origin.
 
- 
- 
Constructor Details- 
PlaneConstructor. Creates a new plane defined by its normal vector and the distance to the origin.- Parameters:
- normal- plane normal
- dist- distance from origin
 
 
- 
- 
Method Details- 
createFromPointsCreates a plane defined by the the specified points.- Parameters:
- a- first point
- b- second point
- c- third point
- Returns:
- a plane
 
- 
clone
- 
flippublic void flip()Flips this plane.
- 
splitPolygonpublic 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 split
- coplanarFront- "coplanar front" polygons
- coplanarBack- "coplanar back" polygons
- front- front polygons
- back- back polgons
 
 
-