rcrt::ImageMaterial Class Reference

#include <ImageMaterial.h>

Inheritance diagram for rcrt::ImageMaterial:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ImageMaterial (ImageTexture *i, float iorR=1, float iorI=0)
 ImageMaterial (ImageTexture *i, const std::complex< float > &IOR)
virtual ~ImageMaterial ()
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

Private Attributes

ImageTextureimageTex


Detailed Description

Definition at line 9 of file ImageMaterial.h.


Constructor & Destructor Documentation

rcrt::ImageMaterial::ImageMaterial ( ImageTexture i,
float  iorR = 1,
float  iorI = 0 
)

Definition at line 6 of file ImageMaterial.cpp.

rcrt::ImageMaterial::ImageMaterial ( ImageTexture i,
const std::complex< float > &  IOR 
)

Definition at line 10 of file ImageMaterial.cpp.

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

Definition at line 14 of file ImageMaterial.cpp.


Member Function Documentation

RGBColor rcrt::ImageMaterial::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 18 of file ImageMaterial.cpp.

References rcrt::ImageTexture::getColor(), rcrt::Intersection::getUV(), and imageTex.

RGBColor rcrt::ImageMaterial::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 23 of file ImageMaterial.cpp.

References rcrt::ImageTexture::getColor(), rcrt::Intersection::getUV(), and imageTex.

RGBColor rcrt::ImageMaterial::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 28 of file ImageMaterial.cpp.

References rcrt::ImageTexture::getColor(), rcrt::Intersection::getUV(), and imageTex.

RGBColor rcrt::ImageMaterial::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 33 of file ImageMaterial.cpp.

References rcrt::RGBColor::BLACK.

ScatterEvent rcrt::ImageMaterial::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 38 of file ImageMaterial.cpp.

References rcrt::DIFFUSE, rcrt::ImageTexture::getColor(), rcrt::Vec3D::getCS(), rcrt::Intersection::getPosition(), rcrt::Material::getShadingNormal(), rcrt::Intersection::getUV(), imageTex, rcrt::Vec3D::normalize(), rcrt::Photon::scalePower(), rcrt::Photon::setDir(), rcrt::Photon::setPos(), and rcrt::STORE.

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

Implements rcrt::Material.

Definition at line 68 of file ImageMaterial.cpp.

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

Implements rcrt::Material.

Definition at line 73 of file ImageMaterial.cpp.

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

Implements rcrt::Material.

Definition at line 78 of file ImageMaterial.cpp.


Member Data Documentation

ImageTexture* rcrt::ImageMaterial::imageTex [private]

Definition at line 12 of file ImageMaterial.h.

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


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