WoodShader Class Reference

#include <WoodShader.h>

Inherits ProceduralShader.

Inheritance diagram for WoodShader:

Inheritance graph
[legend]
Collaboration diagram for WoodShader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WoodShader (Scene *scene, const RGBAColor &color=RGBAColor(0.47, 0.23, 0.07))
RGBAColor shade (const Ray &ray) const

Private Attributes

PerlinNoise mMarkPerlin
RGBAColor mColor
 color for the wood

Detailed Description

A Shader for cloud effects on the sky. The magic numbers for mPerlin originated from the exercise

TODO transform hit point to local coordinates of the object and use it in 3D-PerlinNoise

Author:
Christian Engels

Definition at line 15 of file WoodShader.h.


Constructor & Destructor Documentation

WoodShader::WoodShader ( Scene scene,
const RGBAColor color = RGBAColor(0.47, 0.23, 0.07) 
) [inline]

Constructor

Parameters:
scene The scene which this shader belongs to
color The base color for the sky

Definition at line 22 of file WoodShader.h.


Member Function Documentation

RGBAColor WoodShader::shade ( const Ray ray  )  const [inline, virtual]

normal shade method with a atmospheric scattering effect by using linear interpolation

Parameters:
ray The ray which hits the primitive

Implements Shader.

Definition at line 33 of file WoodShader.h.

References EPSILON, Ray::hit(), Ray::hitPoint(), lerp(), LOG, max(), mColor, min(), mMarkPerlin, ProceduralShader::mPerlin, PerlinNoise::perlinNoise3D(), TexCoordinate::setY(), Primitive::texCoord(), Vec3f::x(), TexCoordinate::x(), Vec3f::y(), TexCoordinate::y(), and Vec3f::z().


Member Data Documentation

PerlinNoise WoodShader::mMarkPerlin [private]

Definition at line 81 of file WoodShader.h.

Referenced by shade().

RGBAColor WoodShader::mColor [private]

color for the wood

Definition at line 82 of file WoodShader.h.

Referenced by shade().


The documentation for this class was generated from the following file:
Generated on Fri Feb 1 00:02:34 2008 for Grayfall by  doxygen 1.5.1