java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.shading.SwitchShader
de.grogra.imp3d.shading.AlgorithmSwitchShader
- All Implemented Interfaces:
Scattering
,Shader
,Manageable
,Shareable
,Scattering
,Shader
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlgorithmSwitchShader.Type
static final SCOType.Field
static final SCOType.Field
static final SCOType.Field
Fields 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_ORIGINS
Fields inherited from interface de.grogra.ray.physics.Shader
LAMBERTIAN_VARIANCE
-
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmSwitchShader
(Shader guiShader, Shader radiationShader) AlgorithmSwitchShader
(Shader guiShader, Shader raytracerShader, Shader radiationShader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ShaderVisitor visitor) int
Returns an average color for the scattering entity.int
getFlags()
protected Shader
getShaderFor
(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.boolean
void
setGuiShader
(Shader value) void
setGUIShader
(Shader value) void
setRadiationShader
(Shader value) void
setRaytracerShader
(Shader value) Methods inherited from class de.grogra.imp3d.shading.SwitchShader
computeBSDF, computeMaxRays, generateRandomRays, shade, transformEnvironment
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
guiShader$FIELD
-
raytracerShader$FIELD
-
radiationShader$FIELD
-
-
Constructor Details
-
AlgorithmSwitchShader
public AlgorithmSwitchShader() -
AlgorithmSwitchShader
-
AlgorithmSwitchShader
-
-
Method Details
-
getAverageColor
public int getAverageColor()Description copied from interface:Scattering
Returns 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:SwitchShader
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.- Specified by:
getShaderFor
in 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:
isTransparent
in interfaceShader
- Overrides:
isTransparent
in classSwitchShader
-
getGUIShader
-
getRaytracerShader
-
getRadiationShader
-
setGUIShader
-
getManageableType
-
setGuiShader
-
setRaytracerShader
-
setRadiationShader
-
accept
-