MirrorShader Class Reference

#include <MirrorShader.h>

Inheritance diagram for MirrorShader:

Shader

Detailed Description

Inherits from Shader. This class is an implementation of a perfect mirror.

Definition at line 16 of file MirrorShader.h.


Public Member Functions

 MirrorShader (Scene *scene, const ColorRGBA &reflection)
 Initializes the shader with the scene and the basic reflection.
 ~MirrorShader ()
ColorRGBA Shade (Ray &ray)
 The ray is mirrored and traced back. After that it is multiplied with the reflection color.

Private Attributes

ColorRGBA reflection
 The color of the reflection.

Constructor & Destructor Documentation

MirrorShader::MirrorShader ( Scene scene,
const ColorRGBA reflection 
) [inline]

Initializes the shader with the scene and the basic reflection.

Definition at line 30 of file MirrorShader.h.

MirrorShader::~MirrorShader (  )  [inline]

Definition at line 33 of file MirrorShader.h.


Member Function Documentation

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

The ray is mirrored and traced back. After that it is multiplied with the reflection color.

Parameters:
ray The ray, that hits a surface that is associated with this shader.

Implements Shader.

Definition at line 40 of file MirrorShader.h.

References Ray::bounces, Ray::dir, Dot(), Primitive::GetNormal(), Ray::hit, Infinity, Ray::org, Scene::RayTrace(), reflection, Shader::scene, Ray::t, Ray::u, and Ray::v.


Field Documentation

ColorRGBA MirrorShader::reflection [private]

The color of the reflection.

ColorRGBA reflection

Definition at line 23 of file MirrorShader.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