de.grogra.ray.tracing
public class DefaultRayTracer extends java.lang.Object implements RayProcessor
| Constructor and Description |
|---|
DefaultRayTracer() |
| Modifier and Type | Method and Description |
|---|---|
void |
getColorFromRay(Ray ray,
Color4f color)
The main methode of a ray processor.
|
LightProcessor |
getLightProcessor() |
int |
getRecursionDepth() |
boolean |
hasFixedLightProcessor() |
void |
prepareRayProcessor(RTScene scene,
IntersectionProcessor intersectionProcessor)
With this method the processor is initialized with a 3d scene
and an intersection processor it will use.
|
void |
setLightProcessor(LightProcessor lightProcessor) |
void |
setRecursionDepth(int value) |
public void getColorFromRay(Ray ray, Color4f color)
RayProcessorgetColorFromRay in interface RayProcessorray - input - calculate for this raycolor - output - the calculated colorpublic LightProcessor getLightProcessor()
getLightProcessor in interface RayProcessorpublic int getRecursionDepth()
getRecursionDepth in interface RayProcessorpublic boolean hasFixedLightProcessor()
hasFixedLightProcessor in interface RayProcessorpublic void prepareRayProcessor(RTScene scene, IntersectionProcessor intersectionProcessor)
RayProcessorprepareRayProcessor in interface RayProcessorpublic void setLightProcessor(LightProcessor lightProcessor)
setLightProcessor in interface RayProcessorpublic void setRecursionDepth(int value)
setRecursionDepth in interface RayProcessor