BowlerKernel
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
eu.mihosoft.vrl.v3d.Plane Class Reference
Collaboration diagram for eu.mihosoft.vrl.v3d.Plane:
Collaboration graph
[legend]

Public Member Functions

 Plane (Vector3d normal, double dist)
 
Plane clone ()
 
void flip ()
 
void splitPolygon (Polygon polygon, List< Polygon > coplanarFront, List< Polygon > coplanarBack, List< Polygon > front, List< Polygon > back)
 

Static Public Member Functions

static Plane createFromPoints (Vector3d a, Vector3d b, Vector3d c)
 
static IPolygonDebugger getDebugger ()
 
static void setDebugger (IPolygonDebugger debugger)
 
static boolean isUseDebugger ()
 
static void setUseDebugger (boolean useDebugger)
 

Public Attributes

Vector3d normal
 
double dist
 

Static Public Attributes

static final double EPSILON = 1.0e-9
 
static final double EPSILON_Point = EPSILON
 
static final double EPSILON_duplicate = 1.0e-4
 
static final Plane XY_PLANE = new Plane(Vector3d.Z_ONE, 1)
 
static final Plane XZ_PLANE = new Plane(Vector3d.Y_ONE, 1)
 
static final Plane YZ_PLANE = new Plane(Vector3d.X_ONE, 1)
 

Static Private Attributes

static IPolygonDebugger debugger = null
 
static boolean useDebugger = false
 

Detailed Description

Represents a plane in 3D space.

Author
Michael Hoffer <info@.nosp@m.mich.nosp@m.aelho.nosp@m.ffer.nosp@m..de>

Definition at line 46 of file Plane.java.

Constructor & Destructor Documentation

◆ Plane()

eu.mihosoft.vrl.v3d.Plane.Plane ( Vector3d  normal,
double  dist 
)

Constructor. Creates a new plane defined by its normal vector and the distance to the origin.

Parameters
normalplane normal
distdistance from origin

Definition at line 87 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.dist, eu.mihosoft.vrl.v3d.Plane.normal, and eu.mihosoft.vrl.v3d.Vector3d.normalized().

Referenced by eu.mihosoft.vrl.v3d.Plane.clone(), and eu.mihosoft.vrl.v3d.Plane.createFromPoints().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

Plane eu.mihosoft.vrl.v3d.Plane.clone ( )

Definition at line 109 of file Plane.java.

References eu.mihosoft.vrl.v3d.Vector3d.clone(), eu.mihosoft.vrl.v3d.Plane.dist, eu.mihosoft.vrl.v3d.Plane.normal, and eu.mihosoft.vrl.v3d.Plane.Plane().

Here is the call graph for this function:

◆ createFromPoints()

static Plane eu.mihosoft.vrl.v3d.Plane.createFromPoints ( Vector3d  a,
Vector3d  b,
Vector3d  c 
)
static

Creates a plane defined by the the specified points.

Parameters
afirst point
bsecond point
cthird point
Returns
a plane

Definition at line 100 of file Plane.java.

References eu.mihosoft.vrl.v3d.Vector3d.cross(), eu.mihosoft.vrl.v3d.Vector3d.dot(), eu.mihosoft.vrl.v3d.Vector3d.minus(), eu.mihosoft.vrl.v3d.Vector3d.normalized(), and eu.mihosoft.vrl.v3d.Plane.Plane().

Referenced by eu.mihosoft.vrl.v3d.Polygon.Polygon().

Here is the call graph for this function:

◆ flip()

void eu.mihosoft.vrl.v3d.Plane.flip ( )

Flips this plane.

Definition at line 116 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.dist, eu.mihosoft.vrl.v3d.Vector3d.negated(), and eu.mihosoft.vrl.v3d.Plane.normal.

Referenced by eu.mihosoft.vrl.v3d.Polygon.flip().

Here is the call graph for this function:

◆ getDebugger()

static IPolygonDebugger eu.mihosoft.vrl.v3d.Plane.getDebugger ( )
static

Definition at line 240 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.debugger.

◆ isUseDebugger()

static boolean eu.mihosoft.vrl.v3d.Plane.isUseDebugger ( )
static

Definition at line 248 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.useDebugger.

◆ setDebugger()

static void eu.mihosoft.vrl.v3d.Plane.setDebugger ( IPolygonDebugger  debugger)
static

Definition at line 244 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.debugger.

◆ setUseDebugger()

static void eu.mihosoft.vrl.v3d.Plane.setUseDebugger ( boolean  useDebugger)
static

Definition at line 252 of file Plane.java.

References eu.mihosoft.vrl.v3d.Plane.useDebugger.

◆ splitPolygon()

void eu.mihosoft.vrl.v3d.Plane.splitPolygon ( Polygon  polygon,
List< Polygon coplanarFront,
List< Polygon coplanarBack,
List< Polygon front,
List< Polygon back 
)

Splits a 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

.

Parameters
polygonpolygon to split
coplanarFront"coplanar front" polygons
coplanarBack"coplanar back" polygons
frontfront polygons
backback polgons

Definition at line 135 of file Plane.java.

References eu.mihosoft.vrl.v3d.Vertex.clone(), eu.mihosoft.vrl.v3d.Plane.debugger, eu.mihosoft.vrl.v3d.Plane.dist, eu.mihosoft.vrl.v3d.Vector3d.dot(), eu.mihosoft.vrl.v3d.Plane.EPSILON, eu.mihosoft.vrl.v3d.Polygon.getStorage(), eu.mihosoft.vrl.v3d.Vertex.interpolate(), eu.mihosoft.vrl.v3d.Vector3d.minus(), eu.mihosoft.vrl.v3d.Plane.normal, eu.mihosoft.vrl.v3d.Polygon.plane, eu.mihosoft.vrl.v3d.Vertex.pos, eu.mihosoft.vrl.v3d.Plane.useDebugger, and eu.mihosoft.vrl.v3d.Polygon.vertices.

Here is the call graph for this function:

Member Data Documentation

◆ debugger

IPolygonDebugger eu.mihosoft.vrl.v3d.Plane.debugger = null
staticprivate

◆ dist

double eu.mihosoft.vrl.v3d.Plane.dist

◆ EPSILON

final double eu.mihosoft.vrl.v3d.Plane.EPSILON = 1.0e-9
static

◆ EPSILON_duplicate

final double eu.mihosoft.vrl.v3d.Plane.EPSILON_duplicate = 1.0e-4
static

◆ EPSILON_Point

final double eu.mihosoft.vrl.v3d.Plane.EPSILON_Point = EPSILON
static

◆ normal

Vector3d eu.mihosoft.vrl.v3d.Plane.normal

◆ useDebugger

boolean eu.mihosoft.vrl.v3d.Plane.useDebugger = false
staticprivate

◆ XY_PLANE

final Plane eu.mihosoft.vrl.v3d.Plane.XY_PLANE = new Plane(Vector3d.Z_ONE, 1)
static

XY plane.

Definition at line 61 of file Plane.java.

◆ XZ_PLANE

final Plane eu.mihosoft.vrl.v3d.Plane.XZ_PLANE = new Plane(Vector3d.Y_ONE, 1)
static

XZ plane.

Definition at line 65 of file Plane.java.

◆ YZ_PLANE

final Plane eu.mihosoft.vrl.v3d.Plane.YZ_PLANE = new Plane(Vector3d.X_ONE, 1)
static

YZ plane.

Definition at line 69 of file Plane.java.


The documentation for this class was generated from the following file: