UniAxialCrystalShader Class Reference

#include <UniAxialCrystalShader.h>

Inheritance diagram for UniAxialCrystalShader:

Shader

Detailed Description

Inherits from Shader. This shader tries to simulate birefringency in uniaxial crystals.

Definition at line 16 of file UniAxialCrystalShader.h.


Public Member Functions

 UniAxialCrystalShader (Scene *scene, float outside=1.0, float ordinary=1.0, float extraordinary=1.0)
ColorRGBA Shade (Ray &ray)
 The main shading function. If a ray hits a surface, this method returns a color of the hitpoint.

Private Attributes

float _outsideRefraction
 The refraction Index from the outside material.
float _ordinaryRefraction
 The refraction Index of the material for ordinary rays.
float _extraOrdinaryRefraction
 The refraction Index of the material for extraordinary rays.
float _alpha
 One of the optical axes.
float _beta
 One of the optical axes.
float _gamma
 One of the optical axes.

Constructor & Destructor Documentation

UniAxialCrystalShader::UniAxialCrystalShader ( Scene scene,
float  outside = 1.0,
float  ordinary = 1.0,
float  extraordinary = 1.0 
) [inline]

Definition at line 66 of file UniAxialCrystalShader.h.

References _alpha, _beta, _extraOrdinaryRefraction, _gamma, _ordinaryRefraction, and _outsideRefraction.


Member Function Documentation

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

The main shading function. If a ray hits a surface, this method returns a color of the hitpoint.

Parameters:
ray The ray that hit the surface.
Returns:
The color of that specific hit.
This shader simulates a ray that hits an uniaxial crystal.

Implements Shader.

Definition at line 87 of file UniAxialCrystalShader.h.

References _alpha, _beta, _extraOrdinaryRefraction, _gamma, _ordinaryRefraction, _outsideRefraction, Ray::bounces, Ray::dir, Dot(), Primitive::GetNormal(), Ray::hit, Infinity, Vector3D::Length(), Ray::org, Scene::RayTrace(), Shader::scene, Ray::t, Ray::u, and Ray::v.


Field Documentation

float UniAxialCrystalShader::_outsideRefraction [private]

The refraction Index from the outside material.

float _outsideRefraction

Definition at line 24 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().

float UniAxialCrystalShader::_ordinaryRefraction [private]

The refraction Index of the material for ordinary rays.

float _ordinaryRefraction

Definition at line 30 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().

float UniAxialCrystalShader::_extraOrdinaryRefraction [private]

The refraction Index of the material for extraordinary rays.

float _outsideRefraction

Definition at line 36 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().

float UniAxialCrystalShader::_alpha [private]

One of the optical axes.

float _alpha

Definition at line 42 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().

float UniAxialCrystalShader::_beta [private]

One of the optical axes.

float _beta

Definition at line 48 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().

float UniAxialCrystalShader::_gamma [private]

One of the optical axes.

float _gamma

Definition at line 54 of file UniAxialCrystalShader.h.

Referenced by Shade(), and UniAxialCrystalShader().


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