de.grogra.imp3d.shading
Class SideSwitchShader
java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.shading.SwitchShader
de.grogra.imp3d.shading.SideSwitchShader
- All Implemented Interfaces:
- Manageable, Shareable, Scattering, Shader
public class SideSwitchShader
- extends SwitchShader
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$TYPE
public static final SideSwitchShader.Type $TYPE
backShader$FIELD
public static final SCOType.Field backShader$FIELD
frontShader$FIELD
public static final SCOType.Field frontShader$FIELD
SideSwitchShader
public SideSwitchShader()
SideSwitchShader
public SideSwitchShader(Shader frontShader)
SideSwitchShader
public SideSwitchShader(Shader frontShader,
Shader backShader)
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).
getBackShader
public Shader getBackShader()
getFlags
public int getFlags()
getFrontShader
public Shader getFrontShader()
getManageableType
public ManageableType getManageableType()
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
setBackShader
public void setBackShader(Shader value)
setFrontShader
public void setFrontShader(Shader value)
setShaders
public void setShaders(Shader front,
Shader back)