de.grogra.imp3d.shading
Class AlgorithmSwitchShader
java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.shading.SwitchShader
de.grogra.imp3d.shading.AlgorithmSwitchShader
- All Implemented Interfaces:
- Manageable, Shareable, Scattering, Shader
public class AlgorithmSwitchShader
- extends SwitchShader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$TYPE
public static final AlgorithmSwitchShader.Type $TYPE
guiShader$FIELD
public static final SCOType.Field guiShader$FIELD
radiationShader$FIELD
public static final SCOType.Field radiationShader$FIELD
raytracerShader$FIELD
public static final SCOType.Field raytracerShader$FIELD
AlgorithmSwitchShader
public AlgorithmSwitchShader()
AlgorithmSwitchShader
public AlgorithmSwitchShader(Shader guiShader,
Shader radiationShader)
AlgorithmSwitchShader
public AlgorithmSwitchShader(Shader guiShader,
Shader raytracerShader,
Shader radiationShader)
accept
public void accept(ShaderVisitor visitor)
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()
getGUIShader
public Shader getGUIShader()
getManageableType
public ManageableType getManageableType()
getRadiationShader
public Shader getRadiationShader()
getRaytracerShader
public Shader getRaytracerShader()
getShaderFor
protected Shader getShaderFor(Environment env,
Vector3f in)
- 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 class SwitchShader
- 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 interface Shader
- Overrides:
isTransparent
in class SwitchShader
setGuiShader
public void setGuiShader(Shader value)
setGUIShader
public void setGUIShader(Shader value)
setRadiationShader
public void setRadiationShader(Shader value)
setRaytracerShader
public void setRaytracerShader(Shader value)