java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.shading.SwitchShader
de.grogra.imp3d.shading.SideSwitchShader
- All Implemented Interfaces:
Scattering,Shader,Manageable,Shareable,Scattering,Shader
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SideSwitchShader.Typestatic final SCOType.Fieldstatic final SCOType.FieldFields inherited from interface de.grogra.ray.physics.Scattering
DELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINSFields inherited from interface de.grogra.ray.physics.Shader
LAMBERTIAN_VARIANCE -
Constructor Summary
ConstructorsConstructorDescriptionSideSwitchShader(Shader frontShader) SideSwitchShader(Shader frontShader, Shader backShader) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ShaderVisitor visitor) intReturns an average color for the scattering entity.intgetFlags()protected ShadergetShaderFor(Environment env, Vector3f in) This method has to be implemented by subclasses and defines the actual shader which shall be used depending on the environment and the ray direction.booleanvoidsetBackShader(Shader value) voidsetFrontShader(Shader value) voidsetShaders(Shader front, Shader back) Methods inherited from class de.grogra.imp3d.shading.SwitchShader
computeBSDF, computeMaxRays, generateRandomRays, shade, transformEnvironmentMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
frontShader$FIELD
-
backShader$FIELD
-
-
Constructor Details
-
SideSwitchShader
public SideSwitchShader() -
SideSwitchShader
-
SideSwitchShader
-
-
Method Details
-
getAverageColor
public int getAverageColor()Description copied from interface:ScatteringReturns an average color for the scattering entity. This color is used for simplified graphical representations of the corresponding objects.- Returns:
- an average color in Java's default sRGB color space, encoded as an int (0xAARRGGBB).
-
getFlags
public int getFlags() -
getShaderFor
Description copied from class:SwitchShaderThis method has to be implemented by subclasses and defines the actual shader which shall be used depending on the environment and the ray direction.- Specified by:
getShaderForin classSwitchShader- Parameters:
env- environment for which shading computations are to be performedin- given ray direction- Returns:
- actual shader to use for shading computations
-
isTransparent
public boolean isTransparent()- Specified by:
isTransparentin interfaceShader- Overrides:
isTransparentin classSwitchShader
-
setShaders
-
getManageableType
-
getFrontShader
-
setFrontShader
-
getBackShader
-
setBackShader
-
accept
-