FlatShader Class Reference

#include <FlatShader.h>

Inheritance diagram for FlatShader:

Shader

Detailed Description

inherits from Shader. This shader maps textures on surfaces.

Definition at line 16 of file FlatShader.h.


Public Member Functions

 FlatShader (Scene *scene, ColorRGBA color=ColorRGBA(1.0, 1.0, 1.0))
 Initializes the shader with the scene and the basic color.
ColorRGBA Shade (Ray &ray)
 Maps textures to the surface and combine them all.

Data Fields

ColorRGBA color
 The basic color of the associated surface.

Constructor & Destructor Documentation

FlatShader::FlatShader ( Scene scene,
ColorRGBA  color = ColorRGBA(1.0,1.0,1.0) 
) [inline]

Initializes the shader with the scene and the basic color.

Definition at line 30 of file FlatShader.h.


Member Function Documentation

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

Maps textures to the surface and combine them all.

Implements Shader.

Definition at line 38 of file FlatShader.h.

References color, Texture::GetTexel(), Shader::getTexture(), Shader::getTextureCount(), Primitive::GetUV(), and Ray::hit.


Field Documentation

ColorRGBA FlatShader::color

The basic color of the associated surface.

ColorRGBA color

Definition at line 24 of file FlatShader.h.

Referenced by Shade().


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