Package org.sunflow.core
Class LightServer
- java.lang.Object
-
- org.sunflow.core.LightServer
-
class LightServer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private CausticPhotonMapInterface
causticPhotonMap
private GIEngine
giEngine
(package private) LightSource[]
lights
private int
maxDiffuseDepth
private int
maxReflectionDepth
private int
maxRefractionDepth
private int
photonCounter
private Scene
scene
private Shader
shaderOverride
private boolean
shaderOverridePhotons
-
Constructor Summary
Constructors Constructor Description LightServer(Scene scene)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
build(Options options)
(package private) boolean
calculatePhotons(PhotonStore map, java.lang.String type, int seed, Options options)
private static void
checkNanInf(Color c)
(package private) Color
getGlobalRadiance(ShadingState state)
(package private) Color
getIrradiance(ShadingState state, Color diffuseReflectance)
private Shader
getPhotonShader(ShadingState state)
(package private) ShadingState
getRadiance(float rx, float ry, float time, int i, int d, Ray r, IntersectionState istate, ShadingCache cache)
(package private) Scene
getScene()
private Shader
getShader(ShadingState state)
(package private) void
initCausticSamples(ShadingState state)
(package private) void
initLightSamples(ShadingState state)
(package private) void
setLights(LightSource[] lights)
(package private) void
setShaderOverride(Shader shader, boolean photonOverride)
(package private) void
shadeBakeResult(ShadingState state)
(package private) Color
shadeHit(ShadingState state)
(package private) void
shadePhoton(ShadingState state, Color power)
(package private) void
showStats()
(package private) void
traceDiffusePhoton(ShadingState previous, Ray r, Color power)
(package private) ShadingState
traceFinalGather(ShadingState previous, Ray r, int i)
(package private) Color
traceGlossy(ShadingState previous, Ray r, int i)
(package private) Color
traceReflection(ShadingState previous, Ray r, int i)
(package private) void
traceReflectionPhoton(ShadingState previous, Ray r, Color power)
(package private) Color
traceRefraction(ShadingState previous, Ray r, int i)
(package private) void
traceRefractionPhoton(ShadingState previous, Ray r, Color power)
(package private) Color
traceShadow(Ray r, ShadingState previous)
-
-
-
Field Detail
-
scene
private Scene scene
-
lights
LightSource[] lights
-
shaderOverride
private Shader shaderOverride
-
shaderOverridePhotons
private boolean shaderOverridePhotons
-
maxDiffuseDepth
private int maxDiffuseDepth
-
maxReflectionDepth
private int maxReflectionDepth
-
maxRefractionDepth
private int maxRefractionDepth
-
causticPhotonMap
private CausticPhotonMapInterface causticPhotonMap
-
giEngine
private GIEngine giEngine
-
photonCounter
private int photonCounter
-
-
Constructor Detail
-
LightServer
LightServer(Scene scene)
-
-
Method Detail
-
setLights
void setLights(LightSource[] lights)
-
getScene
Scene getScene()
-
setShaderOverride
void setShaderOverride(Shader shader, boolean photonOverride)
-
build
boolean build(Options options)
-
showStats
void showStats()
-
calculatePhotons
boolean calculatePhotons(PhotonStore map, java.lang.String type, int seed, Options options)
-
shadePhoton
void shadePhoton(ShadingState state, Color power)
-
traceShadow
Color traceShadow(Ray r, ShadingState previous)
-
traceDiffusePhoton
void traceDiffusePhoton(ShadingState previous, Ray r, Color power)
-
traceReflectionPhoton
void traceReflectionPhoton(ShadingState previous, Ray r, Color power)
-
traceRefractionPhoton
void traceRefractionPhoton(ShadingState previous, Ray r, Color power)
-
getShader
private Shader getShader(ShadingState state)
-
getPhotonShader
private Shader getPhotonShader(ShadingState state)
-
getRadiance
ShadingState getRadiance(float rx, float ry, float time, int i, int d, Ray r, IntersectionState istate, ShadingCache cache)
-
checkNanInf
private static final void checkNanInf(Color c)
-
shadeBakeResult
void shadeBakeResult(ShadingState state)
-
shadeHit
Color shadeHit(ShadingState state)
-
traceGlossy
Color traceGlossy(ShadingState previous, Ray r, int i)
-
traceReflection
Color traceReflection(ShadingState previous, Ray r, int i)
-
traceRefraction
Color traceRefraction(ShadingState previous, Ray r, int i)
-
traceFinalGather
ShadingState traceFinalGather(ShadingState previous, Ray r, int i)
-
getGlobalRadiance
Color getGlobalRadiance(ShadingState state)
-
getIrradiance
Color getIrradiance(ShadingState state, Color diffuseReflectance)
-
initLightSamples
void initLightSamples(ShadingState state)
-
initCausticSamples
void initCausticSamples(ShadingState state)
-
-