- All Known Implementing Classes:
DefaultLightProcessor
public interface LightProcessor
Interface that encapsulates the specific light calculation. It has
to compute all light rays that directly illuminate a specific
intersection point.
- Author:
- Michaal Tauer, Ole Kniemeyer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendStatistics
(StringBuffer stats) Appends some statistics information about the light computations tostats
.Returns a clone of thisLightProcessor
.void
getLightRays
(boolean frontFace, Intersection is, RayList rays, ArrayList cache, Random random) Adds all light rays that directly illuminate the specified intersection pointis
to the listrays
.void
initialize
(Scene scene, int raytracerType, Random random) Initializes the light processor for use with the givenscene
.
-
Method Details
-
dup
Returns a clone of thisLightProcessor
. All constant variables are copied shallowly, state variables are newly created and copied where necessary.- Parameters:
scene
- duplicate of scene- Returns:
- clone of this light processor
-
initialize
Initializes the light processor for use with the givenscene
.- Parameters:
scene
- the scene in which light rays are to be computedraytracerType
- type of raytracerrandom
- pseudorandom generator (Environment.STANDARD_RAY_TRACER
orEnvironment.PATH_TRACER
)
-
getLightRays
Adds all light rays that directly illuminate the specified intersection pointis
to the listrays
.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.- Parameters:
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 generator
-
appendStatistics
Appends some statistics information about the light computations tostats
. This method will be invoked after the whole rendering process has completed.- Parameters:
stats
- buffer for statistics information
-