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 CausticPhotonMapInterfacecausticPhotonMapprivate GIEnginegiEngine(package private) LightSource[]lightsprivate intmaxDiffuseDepthprivate intmaxReflectionDepthprivate intmaxRefractionDepthprivate intmaxTransparencyDepthprivate intphotonCounterprivate Scenesceneprivate ShadershaderOverrideprivate booleanshaderOverridePhotons
-
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) booleanbuild(Options options)(package private) booleancalculatePhotons(PhotonStore map, java.lang.String type, int seed, Options options)private static voidcheckNanInf(Color c)(package private) ColorgetGlobalRadiance(ShadingState state)(package private) ColorgetIrradiance(ShadingState state, Color diffuseReflectance)private ShadergetPhotonShader(ShadingState state)(package private) ShadingStategetRadiance(float rx, float ry, float time, int i, int d, Ray r, IntersectionState istate, ShadingCache cache)(package private) ScenegetScene()private ShadergetShader(ShadingState state)(package private) voidinitCausticSamples(ShadingState state)(package private) voidinitLightSamples(ShadingState state)(package private) voidsetLights(LightSource[] lights)(package private) voidsetShaderOverride(Shader shader, boolean photonOverride)(package private) voidshadeBakeResult(ShadingState state)(package private) ColorshadeHit(ShadingState state)(package private) voidshadePhoton(ShadingState state, Color power)(package private) voidshowStats()(package private) voidtraceDiffusePhoton(ShadingState previous, Ray r, Color power)(package private) ShadingStatetraceFinalGather(ShadingState previous, Ray r, int i)(package private) ColortraceGlossy(ShadingState previous, Ray r, int i)(package private) ColortraceReflection(ShadingState previous, Ray r, int i)(package private) voidtraceReflectionPhoton(ShadingState previous, Ray r, Color power)(package private) ColortraceRefraction(ShadingState previous, Ray r, int i)(package private) voidtraceRefractionPhoton(ShadingState previous, Ray r, Color power)(package private) ColortraceShadow(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
-
maxTransparencyDepth
private int maxTransparencyDepth
-
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)
-
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)
-
traceShadow
Color traceShadow(Ray r, ShadingState previous)
-
-