rcrt::WallMaterial Class Reference

#include <WallMaterial.h>

Inheritance diagram for rcrt::WallMaterial:

Inheritance graph
[legend]
Collaboration diagram for rcrt::WallMaterial:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 WallMaterial (BSDF b, const float &dens)
virtual ~WallMaterial ()
virtual RGBColor sample (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual RGBColor sampleDiffuse (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual RGBColor sampleSpecular (const Vec3D &wOut, const Vec3D &wInc, Intersection &is)
virtual RGBColor getEmitted (const Vec3D &wOut, Intersection &is)
virtual ScatterEvent scatterPhoton (Intersection &is, Photon *photon)
virtual bool refracts () const
virtual bool hasDiffuse () const
virtual bool hasSpecular () const
virtual bool hasTransmissive () const
void distortNormal (Intersection &is) const
Vec3D calcDistNormal (Intersection &is) const
Vec3D getShadingNormal (Intersection &is) const

Private Attributes

BSDFMaterial mat
float density


Detailed Description

Definition at line 12 of file WallMaterial.h.


Constructor & Destructor Documentation

rcrt::WallMaterial::WallMaterial ( BSDF  b,
const float &  dens 
)

Definition at line 6 of file WallMaterial.cpp.

rcrt::WallMaterial::~WallMaterial (  )  [virtual]

Definition at line 10 of file WallMaterial.cpp.


Member Function Documentation

RGBColor rcrt::WallMaterial::sample ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction.
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 14 of file WallMaterial.cpp.

References density, distortNormal(), rcrt::Intersection::getPosition(), mat, PerlinNoise::noise(), and rcrt::BSDFMaterial::sampleDiffuse().

RGBColor rcrt::WallMaterial::sampleDiffuse ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction.
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband diffusely reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 24 of file WallMaterial.cpp.

References distortNormal(), mat, and rcrt::BSDFMaterial::sampleDiffuse().

RGBColor rcrt::WallMaterial::sampleSpecular ( const Vec3D wOut,
const Vec3D wInc,
Intersection is 
) [virtual]

Parameters:
wOut The outgoing direction. Should be the reflected direction of wInc (and vice versa)
wInc The incoming direction.
is The Intersection data.
Returns:
The percentage of each colorband specularily reflected/transmitted along this direction.

Implements rcrt::Material.

Definition at line 33 of file WallMaterial.cpp.

References distortNormal(), mat, and rcrt::BSDFMaterial::sampleSpecular().

RGBColor rcrt::WallMaterial::getEmitted ( const Vec3D wOut,
Intersection is 
) [virtual]

Parameters:
wOut the outgoing direction.
is The Intersection data.
Returns:
The amount of emitted light.

Implements rcrt::Material.

Definition at line 41 of file WallMaterial.cpp.

ScatterEvent rcrt::WallMaterial::scatterPhoton ( Intersection is,
Photon photon 
) [virtual]

Scatters a Photon.

Parameters:
is The Intersection data. Currently this also includes a previous IOR. //TODO refactor the ior stuff
photon A photon, this should be set to the intersection point, a new outgoing direction and should be scaled in power according to the sampling process.

Implements rcrt::Material.

Definition at line 46 of file WallMaterial.cpp.

References mat, and rcrt::BSDFMaterial::scatterPhoton().

bool rcrt::WallMaterial::refracts (  )  const [virtual]

Reimplemented from rcrt::Material.

Definition at line 51 of file WallMaterial.cpp.

bool rcrt::WallMaterial::hasDiffuse (  )  const [virtual]

Implements rcrt::Material.

Definition at line 56 of file WallMaterial.cpp.

References rcrt::BSDFMaterial::hasDiffuse(), and mat.

bool rcrt::WallMaterial::hasSpecular (  )  const [virtual]

Implements rcrt::Material.

Definition at line 61 of file WallMaterial.cpp.

References rcrt::BSDFMaterial::hasSpecular(), and mat.

bool rcrt::WallMaterial::hasTransmissive (  )  const [virtual]

Implements rcrt::Material.

Definition at line 65 of file WallMaterial.cpp.

References rcrt::BSDFMaterial::hasTransmissive(), and mat.

void rcrt::WallMaterial::distortNormal ( Intersection is  )  const

Definition at line 70 of file WallMaterial.cpp.

References calcDistNormal(), and rcrt::Intersection::setSNormalW().

Referenced by sample(), sampleDiffuse(), and sampleSpecular().

Vec3D rcrt::WallMaterial::calcDistNormal ( Intersection is  )  const

Definition at line 75 of file WallMaterial.cpp.

References density, rcrt::Intersection::getPosition(), rcrt::Intersection::getSNormalW(), PerlinNoise::noise(), rcrt::Vec3D::x(), rcrt::Point3D::x(), rcrt::Point3D::y(), rcrt::Vec3D::z(), and rcrt::Point3D::z().

Referenced by distortNormal().

Vec3D rcrt::WallMaterial::getShadingNormal ( Intersection is  )  const [virtual]

Reimplemented from rcrt::Material.

Definition at line 91 of file WallMaterial.cpp.

References rcrt::Intersection::getSNormalW().


Member Data Documentation

BSDFMaterial rcrt::WallMaterial::mat [private]

Definition at line 15 of file WallMaterial.h.

Referenced by hasDiffuse(), hasSpecular(), hasTransmissive(), sample(), sampleDiffuse(), sampleSpecular(), and scatterPhoton().

float rcrt::WallMaterial::density [private]

Definition at line 16 of file WallMaterial.h.

Referenced by calcDistNormal(), and sample().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:53 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3