de.grogra.imp3d.shading
public class SideSwitchShader extends SwitchShader
| Modifier and Type | Class and Description |
|---|---|
static class |
SideSwitchShader.Type |
| Modifier and Type | Field and Description |
|---|---|
static SideSwitchShader.Type |
$TYPE |
static SCOType.Field |
backShader$FIELD |
static SCOType.Field |
frontShader$FIELD |
LAMBERTIAN_VARIANCEDELTA_FACTOR, IS_NON_OPAQUE, MIN_UNUSED_FLAG, NEEDS_NORMAL, NEEDS_POINT, NEEDS_TANGENTS, NEEDS_TRANSFORMATION, NEEDS_UV, RANDOM_RAYS_GENERATE_ORIGINS| Constructor and Description |
|---|
SideSwitchShader() |
SideSwitchShader(Shader frontShader) |
SideSwitchShader(Shader frontShader,
Shader backShader) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ShaderVisitor visitor) |
int |
getAverageColor()
Returns an average color for the scattering entity.
|
Shader |
getBackShader() |
int |
getFlags() |
Shader |
getFrontShader() |
ManageableType |
getManageableType() |
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 |
isTransparent() |
void |
setBackShader(Shader value) |
void |
setFrontShader(Shader value) |
void |
setShaders(Shader front,
Shader back) |
computeBSDF, computeMaxRays, generateRandomRays, shade, transformEnvironmentaddReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferencepublic static final SideSwitchShader.Type $TYPE
public static final SCOType.Field backShader$FIELD
public static final SCOType.Field frontShader$FIELD
public SideSwitchShader()
public SideSwitchShader(Shader frontShader)
public void accept(ShaderVisitor visitor)
public int getAverageColor()
Scatteringpublic Shader getBackShader()
public int getFlags()
public Shader getFrontShader()
public ManageableType getManageableType()
protected Shader getShaderFor(Environment env, Vector3f in)
SwitchShadergetShaderFor in class SwitchShaderenv - environment for which shading computations are to be performedin - given ray directionpublic boolean isTransparent()
isTransparent in interface ShaderisTransparent in class SwitchShaderpublic void setBackShader(Shader value)
public void setFrontShader(Shader value)