|
|||||||||
| 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.BoundingPolytope
This class defines a set of planes which describe a convex, closed polygonal bounding region.
| Constructor Summary | |
BoundingPolytope()
Constructs a BoundingPolytope and initializes it to a cube where -1 <= x,y,z <= 1 |
|
BoundingPolytope(Bounds boundsObject)
Constructs a BoundingPolytope from a bounds object. |
|
BoundingPolytope(Bounds[] boundsObjects)
Constructs a BoundingPolytope from an array of bounds objects. |
|
BoundingPolytope(Vector4d[] planes)
Constructs and initializes a BoundingPolytope from an array of bounding planes. |
|
| Method Summary | |
java.lang.Object |
clone()
Creates a copy of a polytope |
Bounds |
closestIntersection(Bounds[] boundsObjects)
Finds closest bounding object which intersects this bounding polytope |
void |
combine(Bounds boundsObject)
Combines this bounding polytope with a bounding object so that the resulting bounding polytope encloses the original bounding polytope and the given bounds object |
void |
combine(Bounds[] boundsObjects)
Combines this bounding polytope with an array of bounding objects so that the resulting bounding polytope encloses the original bounding polytope and the given array of bounds object |
void |
combine(Point3d point)
Combines this bounding polytope with a point |
void |
combine(Point3d[] points)
Combines this bounding polytope with an array of points |
int |
getNumPlanes()
|
void |
getPlanes(Vector4d[] planes)
Returns the equations of the bounding planes for this bounding polytope |
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,
BoundingPolytope newBoundingPolytope)
Test for intersection with an array of bounds objects |
boolean |
intersect(Bounds boundsObject,
BoundingPolytope newBoundPolytope)
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 polytope is empty. |
void |
set(Bounds boundsObject)
Sets the planes for this BoundingPolytope by keeping its current number and position of planes and computing new planes positions to enclose the given bounds object. |
void |
setPlanes(Vector4d[] planes)
Sets the bounding planes for this polytope. |
java.lang.String |
toString()
Returns a string representation of this class |
void |
transform(Bounds boundsObject,
Transform3D matrix)
Modifies the bounding polytope so that it bounds the volume generated by transforming the given bounding object. |
void |
transform(Transform3D matrix)
This transforms this bounding polytope by the given transformation matrix |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public BoundingPolytope(Vector4d[] planes)
planes - a set of planes defining the polytopepublic BoundingPolytope()
public BoundingPolytope(Bounds boundsObject)
public BoundingPolytope(Bounds[] boundsObjects)
| Method Detail |
public void setPlanes(Vector4d[] planes)
planes - the new set of planes for this polytopepublic void getPlanes(Vector4d[] planes)
planes - an array Vector4d to receive the bounding planespublic int getNumPlanes()
public 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[] boundsObjects)
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 space
public 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 matrix
public boolean intersect(Point3d origin,
Vector3d direction)
public boolean isEmpty()
public boolean intersect(Point3d point)
point - is a Point defining a position in 3-spacepublic boolean intersect(Bounds boundsObject)
boundsObject - is another bounds objectpublic boolean intersect(Bounds[] boundsObjects)
boundsObjects - is an array of bounding objects
public boolean intersect(Bounds boundsObject,
BoundingPolytope newBoundPolytope)
boundsObject - is another bounds objectnewBoundPolytope - is the new bounding polytope which is the intersection of
the boundsObject and this BoundingPolytope
public boolean intersect(Bounds[] boundsObjects,
BoundingPolytope newBoundingPolytope)
boundsObjects - is an array of bounds objectsnewBoundPolytope - is the new bounding polytope which is the intersection of
the boundsObject and this BoundingPolytopepublic 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 | ||||||||