DeferredRenderer 1.0

SpotLight.h

Go to the documentation of this file.
00001 #ifndef SPOTLIGHT_H
00002 #define SPOTLIGHT_H
00003 
00004 #include "ngl/Vector.h"
00005 #include "ngl/Matrix.h"
00006 #include "ngl/Camera.h"
00007 
00008 
00015 class SpotLight
00016 {
00017 public:
00018 
00019     SpotLight(){}
00020 
00028     SpotLight(const ngl::Vector &_position, const ngl::Vector &_target, const float &_distance, const float &_angle, const ngl::Vector &_col, const ngl::Vector &_up);
00029 
00031     ~SpotLight();
00032 
00040     void set(const ngl::Vector &_position, const ngl::Vector &_target, const float &_distance, const float &_angle, const ngl::Vector &_col, const ngl::Vector &_up);
00041 
00045     bool collidesWithSphere(const ngl::Vector &_pos, const float &_rad);
00046 
00050     void draw(const std::string &_vaoName, const std::string &_shader);
00051 
00053     inline ngl::Matrix getView(){return m_lightView;}
00054 
00056     inline ngl::Matrix getWorld(){return m_world;}
00057 
00058 protected:
00059 
00061     ngl::Camera m_matrixCam;
00062 
00064     ngl::Matrix m_lightView;
00065 
00066 private:
00067 
00069     float m_radius;
00070 
00072     ngl::Matrix m_world;
00073 
00075     ngl::Vector m_positionAngle;
00076 
00078     ngl::Vector m_directionDistance;
00079 
00081     ngl::Vector m_colour;
00082 };
00083 
00084 #endif // SPOTLIGHT_H
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines