MixShader Class Reference

#include <MixShader.h>

Inheritance diagram for MixShader:

Shader

Detailed Description

Inherits from Shader. This shader mixes two shaders by interpolating them over the time (The longer the time, the more the first shader wins).

Definition at line 15 of file MixShader.h.


Public Member Functions

 MixShader (Scene *scene, Shader *s1, Shader *s2)
 Initializes the shader with the two shaders and the scene.
 ~MixShader ()
ColorRGBA Shade (Ray &ray)
 The values of the first and the second shader are interpolated over the time.

Private Attributes

Shaders1
 The first shader.
Shaders2
 The second shader.

Constructor & Destructor Documentation

MixShader::MixShader ( Scene scene,
Shader s1,
Shader s2 
) [inline]

Initializes the shader with the two shaders and the scene.

Definition at line 35 of file MixShader.h.

MixShader::~MixShader (  )  [inline]

Definition at line 38 of file MixShader.h.


Member Function Documentation

ColorRGBA MixShader::Shade ( Ray ray  )  [inline, virtual]

The values of the first and the second shader are interpolated over the time.

Parameters:
ray The ray that hits a surface associated with this shader.
Returns:
The color of the hitpoint.

Implements Shader.

Definition at line 46 of file MixShader.h.

References Timer::GetTime(), ColorRGBA::interpolated(), s1, s2, Shader::scene, Shader::Shade(), and Scene::timer.


Field Documentation

Shader* MixShader::s1 [private]

The first shader.

Shader* s1

Definition at line 22 of file MixShader.h.

Referenced by Shade().

Shader* MixShader::s2 [private]

The second shader.

Shader* s2

Definition at line 28 of file MixShader.h.

Referenced by Shade().


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 21:48:55 2008 for RayTracer by  doxygen 1.5.4