javax.media.j3d
Class Bounds

java.lang.Object
  |
  +--javax.media.j3d.Bounds
Direct Known Subclasses:
BoundingBox, BoundingPolytope, BoundingSphere

public abstract class Bounds
extends java.lang.Object
implements java.lang.Cloneable

Abstract class for bounding objects. Sub-classes are BoundingSphere, BoundingBox and BoundingPolytope


Constructor Summary
Bounds()
          Constructs a new Bounds object.
 
Method Summary
abstract  java.lang.Object clone()
          Makes a copy of a bounds object.
abstract  Bounds closestIntersection(Bounds[] boundsObjects)
          Finds closest bounding object which intersects this bounding object
abstract  void combine(Bounds boundsObject)
          Combines this bounding object with a bounding object so that the resulting bounding object encloses the original bounding object and the given bounds object.
abstract  void combine(Bounds[] boundsObjects)
          Combines this bounding object with an array of bounding objects so that the resulting bounding object encloses the original bounding object and the given array of bounds object.
abstract  void combine(Point3d point)
          Combines this bounding object with a point
abstract  void combine(Point3d[] points)
          Combines this bounding object with an array of points
abstract  boolean intersect(Bounds boundsObject)
          Test for intersection with another bounds object /** Test for intersection with another bounds object
abstract  boolean intersect(Bounds[] boundsObjects)
          Test for intersection with another bounds object
abstract  boolean intersect(Point3d point)
          Test for intersection with a point
abstract  boolean intersect(Point3d origin, Vector3d direction)
          Test for intersection with a ray
abstract  boolean isEmpty()
          Tests whether the bounds is empty.
abstract  void set(Bounds boundsObject)
          Sets the value of this Bounds object.
abstract  void transform(Bounds bounds, Transform3D trans)
          Modifies the bounding object so that it bounds the volume generated by transforming the given bounding object.
abstract  void transform(Transform3D trans)
          This transforms this bounding object by the given matrix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bounds

public Bounds()
Constructs a new Bounds object.
Method Detail

clone

public abstract java.lang.Object clone()
Makes a copy of a bounds object.
Overrides:
clone in class java.lang.Object

intersect

public abstract boolean intersect(Point3d origin,
                                  Vector3d direction)
Test for intersection with a ray
Returns:
true or false indicating if an intersection occured

intersect

public abstract boolean intersect(Point3d point)
Test for intersection with a point
Parameters:
point - is a point defining a position in 3-space
Returns:
true or false indicating if an intersection occured

intersect

public abstract boolean intersect(Bounds boundsObject)
Test for intersection with another bounds object /** Test for intersection with another bounds object
Parameters:
boundsObject - is another bounds object
Returns:
true or false indicating if an intersection occured

intersect

public abstract boolean intersect(Bounds[] boundsObjects)
Test for intersection with another bounds object
Parameters:
boundsObjects - is an array of bounding objects
Returns:
true or false indicating if an intersection occured

closestIntersection

public abstract Bounds closestIntersection(Bounds[] boundsObjects)
Finds closest bounding object which intersects this bounding object
Parameters:
boundsObjects - is an array of bounds objects
Returns:
closest bounding object

combine

public abstract void combine(Bounds boundsObject)
Combines this bounding object with a bounding object so that the resulting bounding object encloses the original bounding object and the given bounds object.
Parameters:
boundsObject - is another bounds object

combine

public abstract void combine(Bounds[] boundsObjects)
Combines this bounding object with an array of bounding objects so that the resulting bounding object encloses the original bounding object and the given array of bounds object.
Parameters:
boundsObjects - is an array of bounds objects

combine

public abstract void combine(Point3d point)
Combines this bounding object with a point
Parameters:
point - is a 3d point in space

combine

public abstract void combine(Point3d[] points)
Combines this bounding object with an array of points
Parameters:
points - is an array of 3d points in space

transform

public abstract void transform(Transform3D trans)
This transforms this bounding object by the given matrix

transform

public abstract void transform(Bounds bounds,
                               Transform3D trans)
Modifies the bounding object so that it bounds the volume generated by transforming the given bounding object.
Parameters:
boundsObject - is the bounding object to be transformed
matrix - is a transformation matrix

isEmpty

public abstract boolean isEmpty()
Tests whether the bounds is empty. A bounds is empty if it is null (either by construction or as the result of a null intersection) or if its volume is negative. A bounds with a volume of zero is not empty.
Returns:
true if the bounds is empty; otherwise, it returns false

set

public abstract void set(Bounds boundsObject)
Sets the value of this Bounds object.
Parameters:
boundsObject - is another bounds object.