Class BoundingBox
java.lang.Object
org.scilab.forge.scirenderer.implementation.g2d.motor.BoundingBox
- Author:
- Calixte DENIZET Bounding box of a 3D object, useful to speed-up intersection detection.
-
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox
(double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic BoundingBox
Get the bounding box of an objectboolean
boolean
toString()
int
xCompare
(BoundingBox box) Get the relative x-position of this bounding-box and of the boxint
yCompare
(BoundingBox box) Get the relative y-position of this bounding-box and of the boxint
zCompare
(BoundingBox box) Get the relative z-position of this bounding-box and of the box
-
Constructor Details
-
BoundingBox
public BoundingBox(double minX, double maxX, double minY, double maxY, double minZ, double maxZ) Default constructor- Parameters:
minX
- the minimal XmaxX
- the maximal XminY
- the minimal YmaxY
- the maximal YminZ
- the minimal ZmaxZ
- the maximal Z
-
-
Method Details
-
xCompare
Get the relative x-position of this bounding-box and of the box- Parameters:
box
- a BoundingBox- Returns:
- 1 if box is on the right, -1 if on the left and 0 if nothing.
-
yCompare
Get the relative y-position of this bounding-box and of the box- Parameters:
box
- a BoundingBox- Returns:
- 1 if box is on the bottom, -1 if on the top and 0 if nothing.
-
zCompare
Get the relative z-position of this bounding-box and of the box- Parameters:
box
- a BoundingBox- Returns:
- 1 if box is on the front, -1 if behind and 0 if nothing.
-
isIntersecting
- Parameters:
box
- a BoundingBox- Returns:
- true if this BoundingBox and the box have an intersection
-
isStrictlyIntersecting
- Parameters:
box
- a BoundingBox- Returns:
- true if this BoundingBox and the box have a strict intersection
-
getBoundingBox
Get the bounding box of an object- Parameters:
object
- a 3D object- Returns:
- the corresponding bounding-box
-
toString
-