org.sunflow.core.accel

Class UniformGrid

Implemented Interfaces:
AccelerationStructure

public final class UniformGrid
extends java.lang.Object
implements AccelerationStructure

Constructor Summary

UniformGrid()

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.

Constructor Details

UniformGrid

public UniformGrid()

Method Details

build

public void build(PrimitiveList primitives)
Construct an acceleration structure for the specified primitive list.
Specified by:
build in interface AccelerationStructure
Parameters:
primitives -

intersect

public void intersect(Ray r,
                      IntersectionState state)
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