org.sunflow.core.accel
Class KDTree

java.lang.Object
  extended by org.sunflow.core.accel.KDTree
All Implemented Interfaces:
AccelerationStructure

public class KDTree
extends java.lang.Object
implements AccelerationStructure


Constructor Summary
KDTree()
           
KDTree(int maxPrims)
           
 
Method Summary
 void build(PrimitiveList primitives)
          Construct an acceleration structure for the specified primitive list.
 void intersect(Ray r, IntersectionState state)
          Intersect the specified ray with the geometry in local space.
static void setDumpMode(boolean dump, java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KDTree

public KDTree()

KDTree

public KDTree(int maxPrims)
Method Detail

setDumpMode

public static void setDumpMode(boolean dump,
                               java.lang.String prefix)

build

public void build(PrimitiveList primitives)
Description copied from interface: AccelerationStructure
Construct an acceleration structure for the specified primitive list.

Specified by:
build in interface AccelerationStructure

intersect

public void intersect(Ray r,
                      IntersectionState state)
Description copied from interface: AccelerationStructure
Intersect the specified ray with the geometry in local space. The ray will be provided in local space.

Specified by:
intersect in interface AccelerationStructure
Parameters:
r - ray in local space
state - state to store the intersection into