

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object javax.media.j3d.Bounds javax.media.j3d.BoundingSphere
public class BoundingSphere
This class defines a spherical bounding region which is defined by a center point and a radius.
Constructor Summary  

BoundingSphere()
Constructs and initializes a BoundingSphere with radius = 1 at 0 0 0. 

BoundingSphere(Bounds boundsObject)
Constructs and initializes a BoundingSphere from a bounding object. 

BoundingSphere(Bounds[] boundsObjects)
Constructs and initializes a BoundingSphere from an array of bounding objects. 

BoundingSphere(Point3d center,
double radius)
Constructs and initializes a BoundingSphere from a center and radius. 
Method Summary  

java.lang.Object 
clone()
Creates a copy of the bounding sphere. 
Bounds 
closestIntersection(Bounds[] boundsObjects)
Finds closest bounding object that intersects this bounding sphere. 
void 
combine(Bounds boundsObject)
Combines this bounding sphere with a bounding object so that the resulting bounding sphere encloses the original bounding sphere and the given bounds object. 
void 
combine(Bounds[] boundsObjects)
Combines this bounding sphere with an array of bounding objects so that the resulting bounding sphere encloses the original bounding sphere and the given array of bounds object. 
void 
combine(Point3d point)
Combines this bounding sphere with a point. 
void 
combine(Point3d[] points)
Combines this bounding sphere with an array of points. 
boolean 
equals(java.lang.Object bounds)
Indicates whether the specified bounds object is
equal to this BoundingSphere object. 
void 
getCenter(Point3d center)
Returns the position of this bounding sphere as a point. 
double 
getRadius()
Returns the radius of this bounding sphere as a double. 
int 
hashCode()
Returns a hash code value for this BoundingSphere object based on the data values in this object. 
boolean 
intersect(Bounds boundsObject)
Test for intersection with another bounds object. 
boolean 
intersect(Bounds[] boundsObjects)
Test for intersection with another bounds object. 
boolean 
intersect(Bounds[] boundsObjects,
BoundingSphere newBoundSphere)
Test for intersection with an array of bounds objects. 
boolean 
intersect(Bounds boundsObject,
BoundingSphere newBoundSphere)
Test for intersection with another bounds object. 
boolean 
intersect(Point3d point)
Test for intersection with a point. 
boolean 
intersect(Point3d origin,
Vector3d direction)
Test for intersection with a ray. 
boolean 
isEmpty()
Tests whether the bounding sphere is empty. 
void 
set(Bounds boundsObject)
Sets the value of this BoundingSphere. 
void 
setCenter(Point3d center)
Sets the position of this bounding sphere from a point. 
void 
setRadius(double r)
Sets the radius of this bounding sphere from a double. 
java.lang.String 
toString()
Returns a string representation of this class. 
void 
transform(Bounds boundsObject,
Transform3D matrix)
Modifies the bounding sphere so that it bounds the volume generated by transforming the given bounding object. 
void 
transform(Transform3D trans)
Transforms this bounding sphere by the given matrix. 
Methods inherited from class java.lang.Object 

finalize, getClass, notify, notifyAll, wait, wait, wait 
Constructor Detail 

public BoundingSphere(Point3d center, double radius)
center
 the center of the bounding sphereradius
 the radius of the bounding spherepublic BoundingSphere()
public BoundingSphere(Bounds boundsObject)
boundsObject
 a bounds objectpublic BoundingSphere(Bounds[] boundsObjects)
boundsObjects
 an array of bounds objectsMethod Detail 

public double getRadius()
public void setRadius(double r)
r
 the new radius for the bounding spherepublic void getCenter(Point3d center)
center
 a Point to receive the center of the bounding spherepublic void setCenter(Point3d center)
center
 a Point defining the new center of the bounding spherepublic void set(Bounds boundsObject)
set
in class Bounds
boundsObject
 another bounds objectpublic java.lang.Object clone()
clone
in class Bounds
public boolean equals(java.lang.Object bounds)
bounds
object is
equal to this BoundingSphere object. They are equal if the
specified bounds
object is an instance of
BoundingSphere and all of the data
members of bounds
are equal to the corresponding
data members in this BoundingSphere.
equals
in class Bounds
bounds
 the object with which the comparison is made.
bounds
;
otherwise falsepublic int hashCode()
hashCode
in class Bounds
public void combine(Bounds boundsObject)
combine
in class Bounds
boundsObject
 another bounds objectpublic void combine(Bounds[] boundsObjects)
combine
in class Bounds
boundsObjects
 an array of bounds objectspublic void combine(Point3d point)
combine
in class Bounds
point
 a 3D point in spacepublic void combine(Point3d[] points)
combine
in class Bounds
points
 an array of 3D points in spacepublic void transform(Bounds boundsObject, Transform3D matrix)
transform
in class Bounds
boundsObject
 the bounding object to be transformedmatrix
 a transformation matrixpublic void transform(Transform3D trans)
transform
in class Bounds
trans
 the transformation matrixpublic boolean intersect(Point3d origin, Vector3d direction)
intersect
in class Bounds
origin
 the starting point of the raydirection
 the direction of the ray
public boolean intersect(Point3d point)
intersect
in class Bounds
point
 a point defining a position in 3space
public boolean isEmpty()
isEmpty
in class Bounds
public boolean intersect(Bounds boundsObject)
intersect
in class Bounds
boundsObject
 another bounds object
public boolean intersect(Bounds[] boundsObjects)
intersect
in class Bounds
boundsObjects
 an array of bounding objects
public boolean intersect(Bounds boundsObject, BoundingSphere newBoundSphere)
boundsObject
 another bounds objectnewBoundSphere
 the new bounding sphere which is the intersection of
the boundsObject and this BoundingSphere
public boolean intersect(Bounds[] boundsObjects, BoundingSphere newBoundSphere)
boundsObjects
 an array of bounds objectsnewBoundSphere
 the new bounding sphere which is the intersection of
the boundsObject and this BoundingSphere
public Bounds closestIntersection(Bounds[] boundsObjects)
closestIntersection
in class Bounds
boundsObjects
 an array of bounds objects
public java.lang.String toString()
toString
in class java.lang.Object


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 