Assignments Assignments

directionalLight.h
Go to the documentation of this file.
1#ifndef DIRECTIONAL_LIGHT_INCLUDED
2#define DIRECTIONAL_LIGHT_INCLUDED
3#include "light.h"
4
5 namespace Ray
6{
9 class DirectionalLight : public Light
10 {
12 Util::Point3D _direction;
13 public:
15 static std::string Directive( void ){ return "light_dir"; }
16
18 // Light methods //
20 private:
21 void _write( std::ostream &stream ) const;
22 void _read( std::istream &stream );
23 public:
24 std::string name( void ) const { return "directional light"; }
25 Util::Point3D getAmbient ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
26 Util::Point3D getDiffuse ( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
27 Util::Point3D getSpecular( Util::Ray3D ray , const class RayShapeIntersectionInfo& iInfo , const Material &material ) const;
28 bool isInShadow( const class RayShapeIntersectionInfo& iInfo , const class Shape &shape , unsigned int tIdx ) const;
29 Util::Point3D transparency( const class RayShapeIntersectionInfo &iInfo , const class Shape &shape , Util::Point3D cLimit , unsigned int samples , unsigned int tIdx ) const;
30 void drawOpenGL( int index , GLSLProgram * glslProgram ) const;
31 };
32}
33
34#endif // DIRECTIONAL_LIGHT_INCLUDED
35
36
GLSLProgram
Definition GLSLProgram.h:33
Ray::DirectionalLight
Definition directionalLight.h:10
Ray::DirectionalLight::getDiffuse
Util::Point3D getDiffuse(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition directionalLight.todo.cpp:22
Ray::DirectionalLight::getSpecular
Util::Point3D getSpecular(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition directionalLight.todo.cpp:31
Ray::DirectionalLight::transparency
Util::Point3D transparency(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, Util::Point3D cLimit, unsigned int samples, unsigned int tIdx) const
Definition directionalLight.todo.cpp:49
Ray::DirectionalLight::drawOpenGL
void drawOpenGL(int index, GLSLProgram *glslProgram) const
Definition directionalLight.todo.cpp:58
Ray::DirectionalLight::_read
void _read(std::istream &stream)
Definition directionalLight.cpp:15
Ray::DirectionalLight::_direction
Util::Point3D _direction
Definition directionalLight.h:12
Ray::DirectionalLight::getAmbient
Util::Point3D getAmbient(Util::Ray3D ray, const class RayShapeIntersectionInfo &iInfo, const Material &material) const
Definition directionalLight.todo.cpp:13
Ray::DirectionalLight::isInShadow
bool isInShadow(const class RayShapeIntersectionInfo &iInfo, const class Shape &shape, unsigned int tIdx) const
Definition directionalLight.todo.cpp:40
Ray::DirectionalLight::name
std::string name(void) const
Definition directionalLight.h:24
Ray::DirectionalLight::Directive
static std::string Directive(void)
Definition directionalLight.h:15
Ray::DirectionalLight::_write
void _write(std::ostream &stream) const
Definition directionalLight.cpp:22
Ray::Light
Definition light.h:9
Ray::Material
Definition scene.h:249
Ray::RayShapeIntersectionInfo
Definition scene.h:223
Ray::Shape
Definition shape.h:90
light.h
Ray
Definition box.h:7
Util::Point3D
Point< 3 > Point3D
Definition geometry.h:526
Util::Ray3D
Ray< 3 > Ray3D
Definition geometry.h:562