java.lang.Object
de.grogra.ray.tracing.PhotonMapping
- All Implemented Interfaces:
RayProcessor
Funktioniert momentan nur mit Punktlichtquellen und Arealight
Funktioniert nicht mit directional Light
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
void
getColorFromRay
(Ray ray, Color4f color4) The main methode of a ray processor.int
boolean
void
prepareRayProcessor
(RTScene scene, IntersectionProcessor m_intersectionProcessor) With this method the processor is initialized with a 3d scene and an intersection processor it will use.void
setLightProcessor
(LightProcessor model) void
setPhotonCount
(int photonCount) void
setRang
(int range) void
setRecursionDepth
(int value)
-
Constructor Details
-
PhotonMapping
public PhotonMapping()
-
-
Method Details
-
createPhotonMap
public void createPhotonMap() -
hasFixedLightProcessor
public boolean hasFixedLightProcessor()- Specified by:
hasFixedLightProcessor
in interfaceRayProcessor
-
setLightProcessor
- Specified by:
setLightProcessor
in interfaceRayProcessor
-
getLightProcessor
- Specified by:
getLightProcessor
in interfaceRayProcessor
-
setRecursionDepth
public void setRecursionDepth(int value) - Specified by:
setRecursionDepth
in interfaceRayProcessor
-
getRecursionDepth
public int getRecursionDepth()- Specified by:
getRecursionDepth
in interfaceRayProcessor
-
setPhotonCount
public void setPhotonCount(int photonCount) -
setRang
public void setRang(int range) -
clear
public void clear() -
prepareRayProcessor
Description copied from interface:RayProcessor
With this method the processor is initialized with a 3d scene and an intersection processor it will use.- Specified by:
prepareRayProcessor
in interfaceRayProcessor
-
getColorFromRay
Description copied from interface:RayProcessor
The main methode of a ray processor. This methode has to calculate a color (or luminance of the red, gren and blue ) for each ray.- Specified by:
getColorFromRay
in interfaceRayProcessor
- Parameters:
ray
- input - calculate for this raycolor4
- output - the calculated color
-