rcrt::WoodMaterial Class Reference

#include <WoodMaterial.h>

Inheritance diagram for rcrt::WoodMaterial:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 WoodMaterial (const Point3D &org, const Vec3D &dir, const RGBColor &light, const RGBColor &light)
virtual ~WoodMaterial ()
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 hasDiffuse () const
virtual bool hasSpecular () const
virtual bool hasTransmissive () const
virtual bool refracts () const
Vec3D getShadingNormal (Intersection &is) const

Private Attributes

WoodTexture wood


Detailed Description

Definition at line 10 of file WoodMaterial.h.


Constructor & Destructor Documentation

rcrt::WoodMaterial::WoodMaterial ( const Point3D org,
const Vec3D dir,
const RGBColor light,
const RGBColor light 
)

Definition at line 6 of file WoodMaterial.cpp.

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

Definition at line 11 of file WoodMaterial.cpp.


Member Function Documentation

RGBColor rcrt::WoodMaterial::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 16 of file WoodMaterial.cpp.

References rcrt::WoodTexture::getColor(), rcrt::Intersection::getPosition(), rcrt::RGBAColor::getRGB(), and wood.

Referenced by sampleDiffuse().

RGBColor rcrt::WoodMaterial::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 26 of file WoodMaterial.cpp.

References sample().

RGBColor rcrt::WoodMaterial::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 31 of file WoodMaterial.cpp.

RGBColor rcrt::WoodMaterial::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 36 of file WoodMaterial.cpp.

ScatterEvent rcrt::WoodMaterial::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 61 of file WoodMaterial.cpp.

References rcrt::DIFFUSE, rcrt::WoodTexture::getColor(), rcrt::Vec3D::getCS(), rcrt::Intersection::getPosition(), getShadingNormal(), rcrt::Vec3D::normalize(), rcrt::Photon::scalePower(), rcrt::Photon::setDir(), rcrt::Photon::setPos(), rcrt::STORE, and wood.

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

Implements rcrt::Material.

Definition at line 41 of file WoodMaterial.cpp.

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

Implements rcrt::Material.

Definition at line 46 of file WoodMaterial.cpp.

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

Implements rcrt::Material.

Definition at line 51 of file WoodMaterial.cpp.

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

Reimplemented from rcrt::Material.

Definition at line 56 of file WoodMaterial.cpp.

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

Reimplemented from rcrt::Material.

Definition at line 88 of file WoodMaterial.cpp.

References rcrt::Intersection::backSide(), rcrt::WoodTexture::getBump(), rcrt::Intersection::getPosition(), rcrt::Intersection::getSNormalW(), and wood.

Referenced by scatterPhoton().


Member Data Documentation

WoodTexture rcrt::WoodMaterial::wood [private]

Definition at line 13 of file WoodMaterial.h.

Referenced by getShadingNormal(), sample(), and scatterPhoton().


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