XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class BoundingBox

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.Bounded
          extended byorg.autochthonous.graphics.rt.objects.BoundingBox
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, Partitionable, Traceable

public class BoundingBox
extends Bounded

A bounding box object - whatever it contains will be clipped to the box dimensions.

Example:

      <BoundingBox>
          <Algebraic color="0.1372, 0.557, 0.1372"
              equation="0.5(x^{5} + x^{4}) - y^{2} - z^{2} = 0"/>
      </BoundingBox>
 

Document Type Definition:

     <!ENTITY %Renderable  " Aggregate | Box | Cone | Cylinder | IndexedMesh | Polygon | Sphere | SuperQuadric | Torus | TriangularStrip | Algebraic ">

     <!ELEMENT BoundingBox %Renderable; >
 


Field Summary
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Constructor Summary
BoundingBox(BBox bBox, Renderable obj)
           
 
Method Summary
 BBox bBox()
          return a reference to the current bounding box.
static BoundingBox getInstance(RMLReader in)
           
 HitList intersections(Ray r)
           
 boolean isIntersected(Ray r)
           
 boolean isShadowing(Ray r)
           
 void setShader(Shader s)
           
 void transform(Matrix4f trans)
          apply the given 4x4 transform to the object.
 
Methods inherited from class org.autochthonous.graphics.rt.Bounded
setBBox, setBBox
 
Methods inherited from class org.autochthonous.graphics.rt.Renderable
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, processObject, processParameters, readObject, setColor, setColor, setSelfShadowing, toObjectSpace, toObjectSpace, transformNormal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.autochthonous.graphics.rt.Traceable
clone
 

Constructor Detail

BoundingBox

public BoundingBox(BBox bBox,
                   Renderable obj)
Method Detail

getInstance

public static BoundingBox getInstance(RMLReader in)
                               throws java.io.IOException
Throws:
java.io.IOException

bBox

public BBox bBox()
Description copied from class: Bounded
return a reference to the current bounding box.

Specified by:
bBox in interface Partitionable
Overrides:
bBox in class Bounded

transform

public void transform(Matrix4f trans)
Description copied from class: Bounded
apply the given 4x4 transform to the object.

Overrides:
transform in class Bounded

setShader

public void setShader(Shader s)
Overrides:
setShader in class Renderable

isIntersected

public boolean isIntersected(Ray r)
Specified by:
isIntersected in interface Traceable
Specified by:
isIntersected in class Bounded

intersections

public HitList intersections(Ray r)

isShadowing

public boolean isShadowing(Ray r)
Specified by:
isShadowing in interface Traceable
Specified by:
isShadowing in class Bounded

XJRT Rendering Toolkit 1.0b06