TransparentShader Class Reference

#include <TransparentShader.h>

Inheritance diagram for TransparentShader:

Shader

Detailed Description

Inherits from Shader. This class simulates transpereny by calculating fresnel reflection and reflection.

Definition at line 20 of file TransparentShader.h.


Public Member Functions

 TransparentShader (Scene *scene, float ei, float et)
 Constructor of the Shader.
 ~TransparentShader ()
ColorRGBA Shade (Ray &ray)
 Returns a color for the hitpoint.

Private Attributes

float eta_i
 The index of refraction of the "incoming" material (The material where the ray comes from).
float eta_t
 The index of refraction of the "transport" material (The material where the ray passes through).
Fresnel_fresnel
 Used to evaluate the Fresnel coefficients.

Constructor & Destructor Documentation

TransparentShader::TransparentShader ( Scene scene,
float  ei,
float  et 
) [inline]

Constructor of the Shader.

Definition at line 48 of file TransparentShader.h.

References _fresnel.

TransparentShader::~TransparentShader (  )  [inline]

Definition at line 54 of file TransparentShader.h.

References _fresnel.


Member Function Documentation

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

Returns a color for the hitpoint.

Implements Shader.

Definition at line 63 of file TransparentShader.h.

References _fresnel, Ray::bounces, Ray::dir, Dot(), eta_i, eta_t, Fresnel::Evaluate(), Primitive::GetNormal(), Ray::hit, Infinity, Vector3D::Length(), MAX, Ray::org, Scene::RayTrace(), Shader::scene, Ray::t, Ray::u, and Ray::v.


Field Documentation

float TransparentShader::eta_i [private]

The index of refraction of the "incoming" material (The material where the ray comes from).

float eta_i

Definition at line 28 of file TransparentShader.h.

Referenced by Shade().

float TransparentShader::eta_t [private]

The index of refraction of the "transport" material (The material where the ray passes through).

float eta_t

Definition at line 34 of file TransparentShader.h.

Referenced by Shade().

Fresnel* TransparentShader::_fresnel [private]

Used to evaluate the Fresnel coefficients.

Fresnel* _fresnel

Definition at line 40 of file TransparentShader.h.

Referenced by Shade(), TransparentShader(), and ~TransparentShader().


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