Bouncy Castle Rendering Toolkit 1.0

org.bouncycastle.graphics.rt
Class BBox

java.lang.Object
  |
  +--org.bouncycastle.graphics.rt.BBox

public class BBox
extends java.lang.Object


Field Summary
 float maxX
           
 float maxY
           
 float maxZ
           
 float minX
           
 float minY
           
 float minZ
           
 
Constructor Summary
BBox()
           
BBox(BBox bBox)
           
BBox(float x1, float y1, float z1, float x2, float y2, float z2)
           
 
Method Summary
 BBox add(BBox bBox)
           
 void adjustFor(BBox bb)
           
 void adjustFor(float x, float y, float z)
           
 void adjustFor(Point3f p)
           
 boolean contains(Point3f p)
           
 void expand(double value)
          expand a bounding box by value in every direction on every axis.
 BBox getTransformedBBox(Matrix4f mat)
           
 BBox intersects(BBox bBox)
           
 boolean isIntersecting(Point3f org, Vector3f dir, float[] tvals)
          checks a ray defined by the combination of org and dir against a bounding box returning true if it intersects false otherwise.
 boolean isMissedBy(Ray r)
           
 boolean isMissing(Point3f org, Vector3f dir)
           
 void set(BBox bBox)
           
 void set(float x1, float y1, float z1, float x2, float y2, float z2)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minX

public float minX

minY

public float minY

minZ

public float minZ

maxX

public float maxX

maxY

public float maxY

maxZ

public float maxZ
Constructor Detail

BBox

public BBox()

BBox

public BBox(float x1,
            float y1,
            float z1,
            float x2,
            float y2,
            float z2)

BBox

public BBox(BBox bBox)
Method Detail

add

public BBox add(BBox bBox)

intersects

public BBox intersects(BBox bBox)

set

public void set(BBox bBox)

set

public void set(float x1,
                float y1,
                float z1,
                float x2,
                float y2,
                float z2)

adjustFor

public void adjustFor(float x,
                      float y,
                      float z)

adjustFor

public void adjustFor(Point3f p)

expand

public void expand(double value)
expand a bounding box by value in every direction on every axis.

getTransformedBBox

public BBox getTransformedBBox(Matrix4f mat)

adjustFor

public void adjustFor(BBox bb)

isIntersecting

public boolean isIntersecting(Point3f org,
                              Vector3f dir,
                              float[] tvals)
checks a ray defined by the combination of org and dir against a bounding box returning true if it intersects false otherwise. The tvals array is set with the entry and exit distances of the ray.
Parameters:
org - the origin of the ray.
dir - the direction of the ray.
tvals - return array for the distances to the entry and exit points on the box.

contains

public boolean contains(Point3f p)

isMissing

public boolean isMissing(Point3f org,
                         Vector3f dir)

isMissedBy

public boolean isMissedBy(Ray r)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Bouncy Castle Rendering Toolkit 1.0