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

Public Member Functions

 Bounds (Vector3d min, Vector3d max)
 
Bounds clone ()
 
Vector3d getCenter ()
 
Vector3d getBounds ()
 
CSG toCSG ()
 
Cube toCube ()
 
boolean contains (Vertex v)
 
boolean contains (Vector3d v)
 
boolean contains (Polygon p)
 
boolean intersects (Polygon p)
 
boolean intersects (Bounds b)
 
Vector3d getMin ()
 
Vector3d getMax ()
 
String toString ()
 

Private Attributes

final Vector3d center
 
final Vector3d bounds
 
final Vector3d min
 
final Vector3d max
 
CSG csg
 
Cube cube
 

Detailed Description

Bounding box for CSGs.

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

Definition at line 14 of file Bounds.java.

Constructor & Destructor Documentation

◆ Bounds()

eu.mihosoft.vrl.v3d.Bounds.Bounds ( Vector3d  min,
Vector3d  max 
)

Constructor.

Parameters
minmin x,y,z values
maxmax x,y,z values

Definition at line 40 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Vector3d.clone(), eu.mihosoft.vrl.v3d.Bounds.max, eu.mihosoft.vrl.v3d.Bounds.min, eu.mihosoft.vrl.v3d.Vector3d.x(), eu.mihosoft.vrl.v3d.Vector3d.y(), and eu.mihosoft.vrl.v3d.Vector3d.z().

Referenced by eu.mihosoft.vrl.v3d.Bounds.clone().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

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

Definition at line 59 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.Bounds(), eu.mihosoft.vrl.v3d.Vector3d.clone(), eu.mihosoft.vrl.v3d.Bounds.max, and eu.mihosoft.vrl.v3d.Bounds.min.

Here is the call graph for this function:

◆ contains() [1/3]

boolean eu.mihosoft.vrl.v3d.Bounds.contains ( Polygon  p)

Indicates whether the specified polygon is contained within this bounding box (check includes box boundary).

Parameters
ppolygon to check
Returns
true
if the polygon is contained within this bounding box;
false
otherwise

Definition at line 145 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.contains(), and eu.mihosoft.vrl.v3d.Polygon.vertices.

Here is the call graph for this function:

◆ contains() [2/3]

boolean eu.mihosoft.vrl.v3d.Bounds.contains ( Vector3d  v)

Indicates whether the specified point is contained within this bounding box (check includes box boundary).

Parameters
vvertex to check
Returns
true
if the point is contained within this bounding box;
false
otherwise

Definition at line 129 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.max, eu.mihosoft.vrl.v3d.Bounds.min, eu.mihosoft.vrl.v3d.Vector3d.x(), eu.mihosoft.vrl.v3d.Vector3d.y(), and eu.mihosoft.vrl.v3d.Vector3d.z().

Here is the call graph for this function:

◆ contains() [3/3]

boolean eu.mihosoft.vrl.v3d.Bounds.contains ( Vertex  v)

Indicates whether the specified vertex is contained within this bounding box (check includes box boundary).

Parameters
vvertex to check
Returns
true
if the vertex is contained within this bounding box;
false
otherwise

Definition at line 117 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Vertex.pos.

Referenced by eu.mihosoft.vrl.v3d.Bounds.contains().

◆ getBounds()

Vector3d eu.mihosoft.vrl.v3d.Bounds.getBounds ( )

Returns the bounds (width,height,depth).

Returns
the bounds (width,height,depth)

Definition at line 77 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.bounds.

◆ getCenter()

Vector3d eu.mihosoft.vrl.v3d.Bounds.getCenter ( )

Returns the position of the center.

Returns
the center position

Definition at line 68 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.center.

◆ getMax()

Vector3d eu.mihosoft.vrl.v3d.Bounds.getMax ( )

◆ getMin()

Vector3d eu.mihosoft.vrl.v3d.Bounds.getMin ( )

◆ intersects() [1/2]

boolean eu.mihosoft.vrl.v3d.Bounds.intersects ( Bounds  b)

Indicates whether the specified bounding box intersects with this bounding box (check includes box boundary).

Parameters
bbox to check
Returns
true
if the bounding box intersects this bounding box;
false
otherwise

Definition at line 171 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.getMax(), eu.mihosoft.vrl.v3d.Bounds.getMin(), eu.mihosoft.vrl.v3d.Vector3d.x(), eu.mihosoft.vrl.v3d.Vector3d.y(), and eu.mihosoft.vrl.v3d.Vector3d.z().

Here is the call graph for this function:

◆ intersects() [2/2]

boolean eu.mihosoft.vrl.v3d.Bounds.intersects ( Polygon  p)

Indicates whether the specified polygon intersects with this bounding box (check includes box boundary).

Parameters
ppolygon to check
Returns
true
if the polygon intersects this bounding box;
false
otherwise
Deprecated:
not implemented yet

Definition at line 159 of file Bounds.java.

Referenced by eu.mihosoft.vrl.v3d.CSG._differencePolygonBoundsOpt(), eu.mihosoft.vrl.v3d.CSG._unionIntersectOpt(), and eu.mihosoft.vrl.v3d.CSG._unionPolygonBoundsOpt().

◆ toCSG()

CSG eu.mihosoft.vrl.v3d.Bounds.toCSG ( )

Returns this bounding box as csg.

Returns
this bounding box as csg

Definition at line 86 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.bounds, eu.mihosoft.vrl.v3d.Bounds.center, eu.mihosoft.vrl.v3d.Bounds.csg, eu.mihosoft.vrl.v3d.Bounds.cube, and eu.mihosoft.vrl.v3d.Primitive.toCSG().

Referenced by eu.mihosoft.vrl.v3d.CSG._differenceCSGBoundsOpt().

Here is the call graph for this function:

◆ toCube()

Cube eu.mihosoft.vrl.v3d.Bounds.toCube ( )

Returns this bounding box as cube.

Returns
this bounding box as cube

Definition at line 100 of file Bounds.java.

References eu.mihosoft.vrl.v3d.Bounds.bounds, eu.mihosoft.vrl.v3d.Bounds.center, eu.mihosoft.vrl.v3d.Bounds.csg, eu.mihosoft.vrl.v3d.Bounds.cube, and eu.mihosoft.vrl.v3d.Primitive.toCSG().

Here is the call graph for this function:

◆ toString()

String eu.mihosoft.vrl.v3d.Bounds.toString ( )

Member Data Documentation

◆ bounds

final Vector3d eu.mihosoft.vrl.v3d.Bounds.bounds
private

◆ center

final Vector3d eu.mihosoft.vrl.v3d.Bounds.center
private

◆ csg

CSG eu.mihosoft.vrl.v3d.Bounds.csg
private

The csg.

Definition at line 29 of file Bounds.java.

Referenced by eu.mihosoft.vrl.v3d.Bounds.toCSG(), and eu.mihosoft.vrl.v3d.Bounds.toCube().

◆ cube

Cube eu.mihosoft.vrl.v3d.Bounds.cube
private

The cube.

Definition at line 32 of file Bounds.java.

Referenced by eu.mihosoft.vrl.v3d.Bounds.toCSG(), and eu.mihosoft.vrl.v3d.Bounds.toCube().

◆ max

final Vector3d eu.mihosoft.vrl.v3d.Bounds.max
private

◆ min

final Vector3d eu.mihosoft.vrl.v3d.Bounds.min
private

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