|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.BoundingSphere
public class BoundingSphere
Sphere as simple bounding-volume
.
Field Summary | |
---|---|
protected double[] |
center
Center of the sphere in cartesian coordinates. |
protected double |
r
Radius of the sphere. |
protected double |
rr
Square of the radius. |
Constructor Summary | |
---|---|
BoundingSphere(double[] center,
double radius)
|
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"). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double[] center
protected double r
protected double rr
Constructor Detail |
---|
public BoundingSphere(double[] center, double radius)
Method Detail |
---|
public boolean intersectsRay(double[] P0, double[] P1)
intersectsRay
in interface BoundingVolume
P0
- Ray origin (double[3] or double[4]).P1
- Direction vector of the ray (double[3] or double[4]).
intersection(double[], double[])
public double intersection(double[] P0, double[] P1)
intersection
in interface BoundingVolume
P0
- Ray origin (double[3] or double[4]).P1
- Direction vector of the ray (double[3] or double[4]).
>= 0.0
if the ray intersects the bounding-volume,
number < 0.0
if no intersection exists.intersectsRay(double[], double[])
public boolean intersectsCell(double[] o, double[] size)
intersectsCell
in interface BoundingVolume
o
- Coordinate of minimal cell-vertex (double[3]).size
- Box size (double[3]).
isInside(double[])
public boolean isInside(double[] point)
isInside
in interface BoundingVolume
point
- Coordinates of the 3D point (double[3] or
double[4]).
intersectsCell(double[], double[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |