public class SphereIntersector
extends java.lang.Object
Constructor and Description |
---|
SphereIntersector() |
Modifier and Type | Method and Description |
---|---|
static AABB |
bound(Point3d[] c,
double[] r)
Bound the intersection of N spheres with a bounding box
|
static OBB |
bound(Point3d c1,
double r1,
Point3d c2,
double r2)
Bounds the intersection of two spheres
|
static double |
intersect(Point3d c1,
double r1,
Point3d c2,
double r2,
Vector3d axis,
Vector3d xdv)
Intersects two spheres, finding the distance along
the line from c1 to c2 for the intersection plane
|
public static double intersect(Point3d c1, double r1, Point3d c2, double r2, Vector3d axis, Vector3d xdv)
c1
- center of circle 1r1
- radius of circle 1c2
- center of circle 2r2
- radias of circle 2axis
- from c1 to c2xdv
- x populated with distance along axis, d is the distance from c1 to c2, v is the volume of the intersectionpublic static OBB bound(Point3d c1, double r1, Point3d c2, double r2)
c1
- center of sphere 1r1
- radius of sphere 1c2
- center of sphere 2r2
- radius of sphere 2