cz.cuni.jagrlib.iface
Interface BoundingVolume

All Known Implementing Classes:
BoundingSphere

public interface BoundingVolume

Bounding-volume interface for 3D scenes.

Since:
0.11
See Also:
BoundingVolume.java, Solid

Method Summary
 double intersection(double[] P0, double[] P1)
          Ray vs. bounding-volume intersection test with quantitative result.
 boolean intersectsCell(double[] o, double[] size)
          Rectangular box (AABB) vs. bounding-volume intersection test.
 boolean intersectsRay(double[] P0, double[] P1)
          Ray vs. bounding-volume intersection test.
 boolean isInside(double[] point)
          Point vs. bounding-volume test ("inside-test").
 

Method Detail

intersectsRay

boolean intersectsRay(double[] P0,
                      double[] P1)
Ray vs. bounding-volume intersection test.

Parameters:
P0 - Ray origin (double[3] or double[4]).
P1 - Direction vector of the ray (double[3] or double[4]).
Returns:
true if the ray intersects the bounding-volume.
See Also:
intersection(double[], double[])

intersection

double intersection(double[] P0,
                    double[] P1)
Ray vs. bounding-volume intersection test with quantitative result.

Parameters:
P0 - Ray origin (double[3] or double[4]).
P1 - Direction vector of the ray (double[3] or double[4]).
Returns:
t-parameter >= 0.0 if the ray intersects the bounding-volume, number < 0.0 if no intersection exists.
See Also:
intersectsRay(double[], double[])

intersectsCell

boolean intersectsCell(double[] o,
                       double[] size)
Rectangular box (AABB) vs. bounding-volume intersection test.

Parameters:
o - Coordinate of minimal cell-vertex (double[3]).
size - Box size (double[3]).
Returns:
true if intersection of the cell and the bounding-volume is non-empty.
See Also:
isInside(double[])

isInside

boolean isInside(double[] point)
Point vs. bounding-volume test ("inside-test").

Parameters:
point - Coordinates of the 3D point (double[3] or double[4]).
Returns:
true if the given point lies inside the bounding-volume.
See Also:
intersectsCell(double[], double[])