de.grogra.ray2.light
public interface LightProcessor
| Modifier and Type | Method and Description |
|---|---|
void |
appendStatistics(java.lang.StringBuffer stats)
Appends some statistics information about the light computations to
stats. |
LightProcessor |
dup(Scene scene)
Returns a clone of this
LightProcessor. |
void |
getLightRays(boolean frontFace,
Intersection is,
RayList rays,
java.util.ArrayList cache,
java.util.Random random)
Adds all light rays that directly illuminate the specified
intersection point
is to the list rays. |
void |
initialize(Scene scene,
int raytracerType,
java.util.Random random)
Initializes the light processor for use with the given
scene. |
void appendStatistics(java.lang.StringBuffer stats)
stats. This method will be invoked after the whole
rendering process has completed.stats - buffer for statistics informationLightProcessor dup(Scene scene)
LightProcessor.
All constant variables are copied shallowly, state variables
are newly created and copied where necessary.scene - duplicate of scenevoid getLightRays(boolean frontFace,
Intersection is,
RayList rays,
java.util.ArrayList cache,
java.util.Random random)
is to the list rays.
frontFace indicates whether the front face
(the side where the normal vector points to)
or the back face of the surface at the intersection point is to be
illuminated.
The cache may be used freely by implementations
of this method in order to store some caching information.
Invokers of this method should provide the same cache for
similar situations. E.g., a raytracer should provide an own cache
for every node of the recursive raytracing tree.
frontFace - illuminate front face or back face?is - the intersection pointrays - all determined rays are added to this listcache - the cache may be used freely by implementationsrandom - pseudorandom generatorvoid initialize(Scene scene, int raytracerType, java.util.Random random)
scene.scene - the scene in which light rays are to be computedraytracerType - type of raytracerrandom - pseudorandom generator
(Environment.STANDARD_RAY_TRACER or
Environment.PATH_TRACER)