| java.lang.Object javax.media.j3d.Bounds javax.media.j3d.BoundingPolytope
All known Subclasses: com.db.server.ExtendedBoundingPolytope,
BoundingPolytope | public class BoundingPolytope extends Bounds (Code) | | A BoundingPolytope defines a polyhedral bounding region using the
intersection of four or more half spaces. The region defined by a
BoundingPolytope is always convex and must be closed.
Each plane in the BoundingPolytope specifies a half-space defined
by the equation:
where A, B, C, D are the parameters that specify the plane. The
parameters are passed in the x, y, z, and w fields, respectively,
of a Vector4d object. The intersection of the set of half-spaces
corresponding to the planes in this BoundingPolytope defines the
bounding region.
|
Constructor Summary | |
public | BoundingPolytope(Vector4d[] planes) Constructs a BoundingPolytope using the specified planes. | public | BoundingPolytope() Constructs a BoundingPolytope and initializes it to a set of 6
planes that defines a cube such that -1 <= x,y,z <= 1. | public | BoundingPolytope(Bounds boundsObject) Constructs a BoundingPolytope from the specified bounds object. | public | BoundingPolytope(Bounds[] boundsObjects) Constructs a BoundingPolytope from the specified array of bounds
objects. |
Method Summary | |
public Object | clone() Creates a copy of a polytope. | public Bounds | closestIntersection(Bounds[] boundsObjects) Finds closest bounding object that intersects this bounding polytope. | public 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. | public 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. | public void | combine(Point3d point) Combines this bounding polytope with a point. | public void | combine(Point3d[] points) Combines this bounding polytope with an array of points. | Bounds | copy(Bounds r) | public boolean | equals(Object bounds) Indicates whether the specified bounds object is
equal to this BoundingPolytope object. | Point3d | getCenter() | public int | getNumPlanes() | int | getPickType() | public void | getPlanes(Vector4d[] planes) Returns the equations of the bounding planes for this bounding polytope.
The equations are copied into the specified array.
The array must be large enough to hold all of the vectors. | public int | hashCode() Returns a hash code value for this BoundingPolytope object
based on the data values in this object. | boolean | intersect(Point3d origin, Vector3d direction, Point3d intersectPoint) Test for intersection with a ray. | boolean | intersect(Point3d origin, Vector3d direction, Point4d position) | boolean | intersect(Point3d point, Point4d position) | boolean | intersect(Point3d start, Point3d end, Point4d position) | public boolean | intersect(Point3d origin, Vector3d direction) Test for intersection with a ray. | public boolean | intersect(Point3d point) Test for intersection with a point. | boolean | intersect(Bounds boundsObject, Point4d position) Test for intersection with another bounds object. | public boolean | intersect(Bounds boundsObject) Test for intersection with another bounds object. | public boolean | intersect(Bounds[] boundsObjects) Test for intersection with another bounds object. | public boolean | intersect(Bounds boundsObject, BoundingPolytope newBoundPolytope) Test for intersection with another bounds object. | public boolean | intersect(Bounds[] boundsObjects, BoundingPolytope newBoundingPolytope) Test for intersection with an array of bounds objects. | public boolean | isEmpty() Tests whether the bounding polytope is empty. | public 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. | public void | setPlanes(Vector4d[] planes) Sets the bounding planes for this polytope. | public String | toString() | public void | transform(Bounds boundsObject, Transform3D matrix) Modifies the bounding polytope so that it bounds the volume
generated by transforming the given bounding object. | public void | transform(Transform3D matrix) Transforms this bounding polytope by the given transformation matrix. |
allocBoxVerts | boolean allocBoxVerts(Code) | | |
boxVerts | Point3d boxVerts(Code) | | |
centroid | Point3d centroid(Code) | | |
planes | Vector4d[] planes(Code) | | An array of bounding planes.
|
BoundingPolytope | public BoundingPolytope(Vector4d[] planes)(Code) | | Constructs a BoundingPolytope using the specified planes.
Parameters: planes - a set of planes defining the polytope. exception: IllegalArgumentException - if the length of thespecified array of planes is less than 4. |
BoundingPolytope | public BoundingPolytope()(Code) | | Constructs a BoundingPolytope and initializes it to a set of 6
planes that defines a cube such that -1 <= x,y,z <= 1. The
values of the planes are as follows:
planes[0] : x <= 1 (1,0,0,-1)
planes[1] : -x <= 1 (-1,0,0,-1)
planes[2] : y <= 1 (0,1,0,-1)
planes[3] : -y <= 1 (0,-1,0,-1)
planes[4] : z <= 1 (0,0,1,-1)
planes[5] : -z <= 1 (0,0,-1,-1)
|
BoundingPolytope | public BoundingPolytope(Bounds boundsObject)(Code) | | Constructs a BoundingPolytope from the specified bounds object.
The new polytope will circumscribe the region specified by the
input bounds.
Parameters: boundsObject - the bounds object from which this polytopeis constructed. |
BoundingPolytope | public BoundingPolytope(Bounds[] boundsObjects)(Code) | | Constructs a BoundingPolytope from the specified array of bounds
objects. The new polytope will circumscribe the union of the
regions specified by the input bounds objects.
Parameters: boundsObjects - the array bounds objects from which thispolytope is constructed. |
clone | public Object clone()(Code) | | Creates a copy of a polytope.
a new BoundingPolytope |
closestIntersection | public Bounds closestIntersection(Bounds[] boundsObjects)(Code) | | Finds closest bounding object that intersects this bounding polytope.
Parameters: boundsObjects - is an array of bounds objects closest bounding object |
combine | public void combine(Bounds boundsObject)(Code) | | Combines this bounding polytope with a bounding object so that the
resulting bounding polytope encloses the original bounding polytope and the
given bounds object.
Parameters: boundsObject - another bounds object |
combine | public void combine(Bounds[] boundsObjects)(Code) | | 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.
Parameters: boundsObjects - an array of bounds objects |
combine | public void combine(Point3d point)(Code) | | Combines this bounding polytope with a point.
Parameters: point - a 3d point in space |
combine | public void combine(Point3d[] points)(Code) | | Combines this bounding polytope with an array of points.
Parameters: points - an array of 3d points in space |
copy | Bounds copy(Bounds r)(Code) | | if the passed the "region" is same type as this object
then do a copy, otherwise clone the Bounds and
return
|
equals | public boolean equals(Object bounds)(Code) | | Indicates whether the specified bounds object is
equal to this BoundingPolytope object. They are equal if the
specified bounds object is an instance of
BoundingPolytope and all of the data
members of bounds are equal to the corresponding
data members in this BoundingPolytope.
Parameters: bounds - the object with which the comparison is made. true if this BoundingPolytope is equal to bounds ;otherwise false since: Java 3D 1.2 |
getCenter | Point3d getCenter()(Code) | | |
getNumPlanes | public int getNumPlanes()(Code) | | |
getPickType | int getPickType()(Code) | | |
getPlanes | public void getPlanes(Vector4d[] planes)(Code) | | Returns the equations of the bounding planes for this bounding polytope.
The equations are copied into the specified array.
The array must be large enough to hold all of the vectors.
The individual array elements must be allocated by the caller.
Parameters: planes - an array Vector4d to receive the bounding planes |
hashCode | public int hashCode()(Code) | | Returns a hash code value for this BoundingPolytope object
based on the data values in this object. Two different
BoundingPolytope objects with identical data values (i.e.,
BoundingPolytope.equals returns true) will return the same hash
code value. Two BoundingPolytope objects with different data
members may return the same hash code value, although this is
not likely.
a hash code value for this BoundingPolytope object. since: Java 3D 1.2 |
intersect | boolean intersect(Point3d origin, Vector3d direction, Point3d intersectPoint)(Code) | | Test for intersection with a ray.
Parameters: origin - is a the starting point of the ray Parameters: direction - is the direction of the ray Parameters: intersectPoint - is a point defining the location of the intersection true or false indicating if an intersection occured |
intersect | boolean intersect(Point3d origin, Vector3d direction, Point4d position)(Code) | | Test for intersection with a ray
Parameters: origin - is a the starting point of the ray Parameters: direction - is the direction of the ray Parameters: position - is a point defining the location of the pick w= distance to pick true or false indicating if an intersection occured |
intersect | boolean intersect(Point3d point, Point4d position)(Code) | | Test for intersection with a point
Parameters: point - is the pick point Parameters: position - is a point defining the location of the pick w= distance to pick true or false indicating if an intersection occured |
intersect | boolean intersect(Point3d start, Point3d end, Point4d position)(Code) | | Test for intersection with a segment
Parameters: start - is a point defining the start of the line segment Parameters: end - is a point defining the end of the line segment Parameters: position - is a point defining the location of the pick w= distance to pick true or false indicating if an intersection occured |
intersect | public boolean intersect(Point3d origin, Vector3d direction)(Code) | | Test for intersection with a ray.
Parameters: origin - the starting point of the ray Parameters: direction - the direction of the ray true or false indicating if an intersection occured |
intersect | public boolean intersect(Point3d point)(Code) | | Test for intersection with a point.
Parameters: point - a Point defining a position in 3-space true or false indicating if an intersection occured |
intersect | boolean intersect(Bounds boundsObject, Point4d position)(Code) | | Test for intersection with another bounds object.
Parameters: boundsObject - another bounds object true or false indicating if an intersection occured |
intersect | public boolean intersect(Bounds boundsObject)(Code) | | Test for intersection with another bounds object.
Parameters: boundsObject - another bounds object true or false indicating if an intersection occured |
intersect | public boolean intersect(Bounds[] boundsObjects)(Code) | | Test for intersection with another bounds object.
Parameters: boundsObjects - an array of bounding objects true or false indicating if an intersection occured |
intersect | public boolean intersect(Bounds boundsObject, BoundingPolytope newBoundPolytope)(Code) | | Test for intersection with another bounds object.
Parameters: boundsObject - another bounds object Parameters: newBoundPolytope - the new bounding polytope, which is the intersection ofthe boundsObject and this BoundingPolytope true or false indicating if an intersection occured |
intersect | public boolean intersect(Bounds[] boundsObjects, BoundingPolytope newBoundingPolytope)(Code) | | Test for intersection with an array of bounds objects.
Parameters: boundsObjects - an array of bounds objects Parameters: newBoundingPolytope - the new bounding polytope, which is the intersection ofthe boundsObject and this BoundingPolytope true or false indicating if an intersection occured |
isEmpty | public boolean isEmpty()(Code) | | Tests whether the bounding polytope is empty. A bounding polytope is
empty if it is null (either by construction or as the result of
a null intersection) or if its volume is negative. A bounding polytope
with a volume of zero is not empty.
true if the bounding polytope is empty;otherwise, it returns false |
set | public void set(Bounds boundsObject)(Code) | | 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.
Parameters: boundsObject - another bounds object |
setPlanes | public void setPlanes(Vector4d[] planes)(Code) | | Sets the bounding planes for this polytope.
Parameters: planes - the new set of planes for this polytope exception: IllegalArgumentException - if the length of thespecified array of planes is less than 4. |
toString | public String toString()(Code) | | Returns a string representation of this class
|
transform | public void transform(Bounds boundsObject, Transform3D matrix)(Code) | | Modifies the bounding polytope so that it bounds the volume
generated by transforming the given bounding object.
Parameters: boundsObject - the bounding object to be transformed Parameters: matrix - a transformation matrix |
transform | public void transform(Transform3D matrix)(Code) | | Transforms this bounding polytope by the given transformation matrix.
Parameters: matrix - a transformation matrix |
Methods inherited from javax.media.j3d.Bounds | abstract public Object clone()(Code)(Java Doc) abstract public Bounds closestIntersection(Bounds[] boundsObjects)(Code)(Java Doc) boolean closest_point(Point3d g, Vector4d[] planes, Point3d new_point)(Code)(Java Doc) abstract public void combine(Bounds boundsObject)(Code)(Java Doc) abstract public void combine(Bounds[] boundsObjects)(Code)(Java Doc) abstract public void combine(Point3d point)(Code)(Java Doc) abstract public void combine(Point3d[] points)(Code)(Java Doc) abstract Bounds copy(Bounds region)(Code)(Java Doc) abstract public boolean equals(Object bounds)(Code)(Java Doc) abstract Point3d getCenter()(Code)(Java Doc) abstract int getPickType()(Code)(Java Doc) synchronized void getWithLock(Bounds b)(Code)(Java Doc) abstract public int hashCode()(Code)(Java Doc) abstract public boolean intersect(Point3d origin, Vector3d direction)(Code)(Java Doc) abstract public boolean intersect(Point3d point)(Code)(Java Doc) abstract boolean intersect(Point3d origin, Vector3d direction, Point4d position)(Code)(Java Doc) abstract boolean intersect(Point3d point, Point4d position)(Code)(Java Doc) abstract boolean intersect(Point3d start, Point3d end, Point4d position)(Code)(Java Doc) abstract boolean intersect(Bounds boundsObject, Point4d position)(Code)(Java Doc) abstract public boolean intersect(Bounds boundsObject)(Code)(Java Doc) abstract public boolean intersect(Bounds[] boundsObjects)(Code)(Java Doc) boolean intersect_ptope_abox(BoundingPolytope polyTope, BoundingBox box)(Code)(Java Doc) boolean intersect_ptope_ptope(BoundingPolytope poly1, BoundingPolytope poly2)(Code)(Java Doc) boolean intersect_ptope_sphere(BoundingPolytope polyTope, BoundingSphere sphere)(Code)(Java Doc) abstract public boolean isEmpty()(Code)(Java Doc) abstract public void set(Bounds boundsObject)(Code)(Java Doc) synchronized void setWithLock(Bounds b)(Code)(Java Doc) abstract public void transform(Transform3D trans)(Code)(Java Doc) abstract public void transform(Bounds bounds, Transform3D trans)(Code)(Java Doc)
|
|
|