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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidvoidgetColorFromRay(Ray ray, Color4f color4) The main methode of a ray processor.intbooleanvoidprepareRayProcessor(RTScene scene, IntersectionProcessor m_intersectionProcessor) With this method the processor is initialized with a 3d scene and an intersection processor it will use.voidsetLightProcessor(LightProcessor model) voidsetPhotonCount(int photonCount) voidsetRang(int range) voidsetRecursionDepth(int value)
-
Constructor Details
-
PhotonMapping
public PhotonMapping()
-
-
Method Details
-
createPhotonMap
public void createPhotonMap() -
hasFixedLightProcessor
public boolean hasFixedLightProcessor()- Specified by:
hasFixedLightProcessorin interfaceRayProcessor
-
setLightProcessor
- Specified by:
setLightProcessorin interfaceRayProcessor
-
getLightProcessor
- Specified by:
getLightProcessorin interfaceRayProcessor
-
setRecursionDepth
public void setRecursionDepth(int value) - Specified by:
setRecursionDepthin interfaceRayProcessor
-
getRecursionDepth
public int getRecursionDepth()- Specified by:
getRecursionDepthin interfaceRayProcessor
-
setPhotonCount
public void setPhotonCount(int photonCount) -
setRang
public void setRang(int range) -
clear
public void clear() -
prepareRayProcessor
Description copied from interface:RayProcessorWith this method the processor is initialized with a 3d scene and an intersection processor it will use.- Specified by:
prepareRayProcessorin interfaceRayProcessor- Parameters:
scene-m_intersectionProcessor-
-
getColorFromRay
Description copied from interface:RayProcessorThe 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:
getColorFromRayin interfaceRayProcessor- Parameters:
ray- input - calculate for this raycolor4- output - the calculated color
-