#include <UniAxialCrystalShader.h>
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. |
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.
The main shading function. If a ray hits a surface, this method returns a color of the hitpoint.
ray | The ray that hit the surface. |
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.
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().