XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class BvTree

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.objects.BvTree
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, Illuminated, Traceable

public class BvTree
extends Renderable
implements Illuminated

A BvTree.

We use this as it guarantees that an object will only be tested once per ray, without the need for mail boxes and the like. It's other advantage is, because it does a 3 way split at each level, it doesn't result in duplicated objects.


Field Summary
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Constructor Summary
BvTree()
           
BvTree(Aggregate objs)
           
BvTree(Partitionable[] objs)
           
 
Method Summary
 AtmosphereDataList affectingAtmospheres(Hit hit)
          Return the atmospheres that affect the light coming back from the hit.
 HitList intersections(Ray r)
           
 boolean isIntersected(Ray r)
           
 boolean isShadowing(Ray r)
           
 LightDataList visibleLights(Hit hit)
           
 
Methods inherited from class org.autochthonous.graphics.rt.Renderable
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, processObject, processParameters, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transform, 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

BvTree

public BvTree()

BvTree

public BvTree(Aggregate objs)

BvTree

public BvTree(Partitionable[] objs)
Method Detail

visibleLights

public LightDataList visibleLights(Hit hit)
Specified by:
visibleLights in interface Illuminated

affectingAtmospheres

public AtmosphereDataList affectingAtmospheres(Hit hit)
Description copied from interface: Illuminated
Return the atmospheres that affect the light coming back from the hit.

Specified by:
affectingAtmospheres in interface Illuminated
Parameters:
hit - the hit of interest.
Returns:
a list of atmospheres that affect the light coming in.

isIntersected

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

intersections

public HitList intersections(Ray r)
Specified by:
intersections in interface Traceable

isShadowing

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

XJRT Rendering Toolkit 1.0b06