|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.Bounds | +--javax.media.j3d.BoundingBox
This class defines an axis aligned bounding box which is used for bounding regions.
Constructor Summary | |
BoundingBox()
Constructs and initializes a cube where -1 <= x,y,z <= 1. |
|
BoundingBox(Bounds boundsObject)
Constructs a BoundingBox from a bounding object. |
|
BoundingBox(Bounds[] bounds)
Constructs a BoundingBox from an array of bounding objects. |
|
BoundingBox(Point3d lower,
Point3d upper)
Constructs and initializes a BoundingBox given min,max in x,y,z. |
Method Summary | |
java.lang.Object |
clone()
Creates a copy of this bounding box. |
Bounds |
closestIntersection(Bounds[] boundsObjects)
Finds closest bounding object which intersects this bounding box |
void |
combine(Bounds boundsObject)
Combines this bounding box with a bounding object so that the resulting bounding box encloses the original bounding box and the specified bounds object. |
void |
combine(Bounds[] bounds)
Combines this bounding box with an array of bounding objects so that the resulting bounding box encloses the original bounding box and the array of bounding objects. |
void |
combine(Point3d point)
Combines this bounding box with a point so that the resulting bounding box encloses the original bounding box and the point. |
void |
combine(Point3d[] points)
Combines this bounding box with an array of points so that the resulting bounding box encloses the original bounding box and the array of points. |
void |
getLower(Point3d p1)
Gets the lower corner of this bounding box. |
void |
getUpper(Point3d p1)
Gets the upper corner of this bounding box. |
boolean |
intersect(Bounds boundsObject)
Test for intersection with another bounds object |
boolean |
intersect(Bounds[] boundsObjects)
Test for intersection with an array of bounds objects |
boolean |
intersect(Bounds[] boundsObjects,
BoundingBox newBoundBox)
Test for intersection with an array of bounds objects |
boolean |
intersect(Bounds boundsObject,
BoundingBox newBoundBox)
Test for intersection with another bounding box |
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 box is empty. |
void |
set(Bounds boundsObject)
Sets the the value of this BoundingBox |
void |
setLower(double xmin,
double ymin,
double zmin)
Sets the lower corner of this bounding box. |
void |
setLower(Point3d p1)
Sets the lower corner of this bounding box. |
void |
setUpper(double xmax,
double ymax,
double zmax)
Sets the upper corner of this bounding box. |
void |
setUpper(Point3d p1)
Sets the upper corner of this bounding box. |
java.lang.String |
toString()
Returns a string representation of this class |
void |
transform(Bounds boundsObject,
Transform3D matrix)
Modifies the bounding box so that it bounds the volume generated by transforming the given bounding object. |
void |
transform(Transform3D matrix)
Transforms this bounding box by the given matrix |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public BoundingBox(Point3d lower, Point3d upper)
lower
- the "small" cornerupper
- the "large" cornerpublic BoundingBox()
public BoundingBox(Bounds boundsObject)
boundsObject
- is a bounds objectpublic BoundingBox(Bounds[] bounds)
bounds
- an array of bounding objectsMethod Detail |
public void getLower(Point3d p1)
p1
- a Point to receive the lower corner of the bounding boxpublic void setLower(double xmin, double ymin, double zmin)
xmin
- minimum x value of boundining boxymin
- minimum y value of boundining boxzmin
- minimum z value of boundining boxpublic void setLower(Point3d p1)
p1
- a Point defining the new lower corner of the bounding boxpublic void getUpper(Point3d p1)
p1
- a Point to receive the upper corner of the bounding boxpublic void setUpper(double xmax, double ymax, double zmax)
xmax
- max x value of boundining boxymax
- max y value of boundining boxzmax
- max z value of boundining boxpublic void setUpper(Point3d p1)
p1
- a Point defining the new upper corner of the bounding boxpublic void set(Bounds boundsObject)
boundsObject
- is another bounds objectpublic java.lang.Object clone()
public void combine(Bounds boundsObject)
boundsObject
- is another bounds objectpublic void combine(Bounds[] bounds)
boundsObjects
- is an array of bounds objectspublic void combine(Point3d point)
point
- is a 3d point in spacepublic void combine(Point3d[] points)
points
- is an array of 3d points in spacepublic void transform(Bounds boundsObject, Transform3D matrix)
boundsObject
- is the bounding object to be transformedmatrix
- is a transformation matrixpublic void transform(Transform3D matrix)
matrix
- is a transformation matrixpublic boolean intersect(Point3d origin, Vector3d direction)
public boolean intersect(Point3d point)
point
- is a point defining a position in 3-spacepublic boolean isEmpty()
public boolean intersect(Bounds boundsObject)
boundsObject
- is another bounds objectpublic boolean intersect(Bounds[] boundsObjects)
boundsObjects
- is an array of bounding objectspublic boolean intersect(Bounds boundsObject, BoundingBox newBoundBox)
boundsObject
- is another bounding objectnewBoundBox
- is the new bounding box which is the intersection of
the boundsObject and this BoundingBoxpublic boolean intersect(Bounds[] boundsObjects, BoundingBox newBoundBox)
boundsObjects
- is an array of bounds objectsnewBoundBox
- is the new bounding box which is the intersection of
the boundsObject and this BoundingBoxpublic Bounds closestIntersection(Bounds[] boundsObjects)
boundsObjects
- is an array of bounds objectspublic java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |