org.autochthonous.graphics.rt.objects
Class BoundingBox
java.lang.Object
org.autochthonous.graphics.rt.Renderable
org.autochthonous.graphics.rt.Bounded
org.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; >
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 |
BoundingBox
public BoundingBox(BBox bBox,
Renderable obj)
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