Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Nested Class Summary
`static class` | `AlgorithmSwitchShader.Type`

Field Summary
`static AlgorithmSwitchShader.Type` | `$TYPE`
`static SCOType.Field` | `guiShader$FIELD`
`static SCOType.Field` | `radiationShader$FIELD`
`static SCOType.Field` | `raytracerShader$FIELD`

Fields inherited from interface de.grogra.ray.physics.Shader
`LAMBERTIAN_VARIANCE`

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`

Constructor Summary
`AlgorithmSwitchShader()`
`AlgorithmSwitchShader(Shader guiShader, Shader radiationShader)`
`AlgorithmSwitchShader(Shader guiShader, Shader raytracerShader, Shader radiationShader)`

Method Summary
`void` | `accept(ShaderVisitor visitor)`
`int` | `getAverageColor()` Returns an average color for the scattering entity.
`int` | `getFlags()`
`Shader` | `getGUIShader()`
`ManageableType` | `getManageableType()`
`Shader` | `getRadiationShader()`
`Shader` | `getRaytracerShader()`
`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` | `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`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### $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

Constructor Detail

### AlgorithmSwitchShader

    public AlgorithmSwitchShader()

### AlgorithmSwitchShader

    public AlgorithmSwitchShader(Shader guiShader,
                                 Shader radiationShader)

### AlgorithmSwitchShader

    public AlgorithmSwitchShader(Shader guiShader,
                                 Shader raytracerShader,
                                 Shader radiationShader)

Method Detail

### 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 performed
    `in` - 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)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD