#include <MirrorShader.h>
Inherits Shader.
Inheritance diagram for MirrorShader:
Public Member Functions | |
MirrorShader (Scene *scene, const RGBAColor &color) | |
RGBAColor | shade (const Ray &ray) const |
Private Attributes | |
RGBAColor | mMirrorColor |
A color to shade the reflected ray. |
Definition at line 15 of file MirrorShader.h.
Constructor
scene | Pointer to the scene | |
color | Color of the mirror |
Definition at line 23 of file MirrorShader.h.
Mirror the ray on the surface and trace back
ray | The ray which hits the surface which we should shade |
Implements Shader.
Definition at line 33 of file MirrorShader.h.
References RGBAColor::a(), Ray::dir(), Vec3f::dot(), EPSILON, Ray::hit(), Ray::hitPoint(), Ray::influence(), Ray::init(), lerp(), MAX_RECURSION_DEEP, MIN_INFLUENCE, mMirrorColor, Shader::mScene, Shader::normal(), Ray::obj(), Scene::rayTrace(), Ray::recDeep(), RGBAColor::rgb(), and Ray::updateInfluence().
RGBAColor MirrorShader::mMirrorColor [private] |
A color to shade the reflected ray.
Definition at line 65 of file MirrorShader.h.
Referenced by shade().