Noise Class Reference

#include <noise.h>

List of all members.

Public Member Functions

double get_noise (const Point3D &point) const
 Noise (int seed)
 Create noise with specified seed.
 Noise ()
 Create noise with default seed.

Protected Member Functions

void init_noise (int seed)
 Initialize noise matrix.

Protected Attributes

int m_noiseMatrix [MAX_NOISE][MAX_NOISE][MAX_NOISE]


Detailed Description

Definition at line 12 of file noise.h.


Constructor & Destructor Documentation

Noise::Noise (  )  [inline]

Create noise with default seed.

Definition at line 17 of file noise.h.

References init_noise().

Here is the call graph for this function:

Noise::Noise ( int  seed  )  [inline]

Create noise with specified seed.

Definition at line 20 of file noise.h.

References init_noise().

Here is the call graph for this function:


Member Function Documentation

double Noise::get_noise ( const Point3D point  )  const

Calculate noise value at given point in space.

Based on a Pascal interpretation of 1985 Perlin noise function, which in turn was based on Alan Watt's Fundamentals of Three- Dimensional Computer Graphics.

Definition at line 41 of file noise.cpp.

References m_noiseMatrix, MAX_NOISE, Point3D::x, Point3D::y, and Point3D::z.

Referenced by NoiseMaterial::choose_material(), MarbleMaterial::get_color(), MarbleMaterial::get_diffuse(), MarbleMaterial::get_opacity(), MarbleMaterial::get_reflection(), MarbleMaterial::get_reflectivity(), and MarbleMaterial::get_refraction_index().

Here is the caller graph for this function:

void Noise::init_noise ( int  seed  )  [protected]

Initialize noise matrix.

Definition at line 6 of file noise.cpp.

References m_noiseMatrix, and MAX_NOISE.

Referenced by Noise().

Here is the caller graph for this function:


Member Data Documentation

int Noise::m_noiseMatrix[MAX_NOISE][MAX_NOISE][MAX_NOISE] [protected]

Noise matrix. Hold random values. Exact noise value is interpolated from the values in this matrix.

Definition at line 35 of file noise.h.

Referenced by get_noise(), and init_noise().


The documentation for this class was generated from the following files:
Generated on Tue Oct 30 22:12:22 2007 for mbrt by  doxygen 1.5.2