CloudShader Class Reference

#include <CloudShader.h>

Inheritance diagram for CloudShader:

Shader

Detailed Description

An inherited class of Shader. It simulates real clouds.

Definition at line 17 of file CloudShader.h.


Public Member Functions

 CloudShader (Scene *scene, ColorRGBA color=ColorRGBA(0.08, 0.15, 0.27))
ColorRGBA Shade (Ray &ray)
 Return a color for the hitpoint of the ray.

Private Attributes

ColorRGBA color
 The color of the clouds.
PerlinNoise3D pnoise
 The noise that is used to simulate the clouds.

Constructor & Destructor Documentation

CloudShader::CloudShader ( Scene scene,
ColorRGBA  color = ColorRGBA (0.08,0.15,0.27) 
) [inline]

Definition at line 34 of file CloudShader.h.


Member Function Documentation

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

Return a color for the hitpoint of the ray.

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

Implements Shader.

Definition at line 45 of file CloudShader.h.

References color, Ray::dir, Timer::GetTime(), Primitive::GetUV(), Ray::hit, PerlinNoise3D::noise(), Ray::org, PAIR, pnoise, Ray::t, Scene::timer, Vector3D::x(), Vector3D::y(), and Vector3D::z().


Field Documentation

ColorRGBA CloudShader::color [private]

The color of the clouds.

ColorRGBA color

Definition at line 24 of file CloudShader.h.

Referenced by Shade().

PerlinNoise3D CloudShader::pnoise [private]

The noise that is used to simulate the clouds.

PerlinNoise3D pnoise

Definition at line 30 of file CloudShader.h.

Referenced by Shade().


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