Class DirectionalLight

Inheritance Relationships

Base Type

Class Documentation

class DirectionalLight : public Light

Public Functions

DirectionalLight()
DirectionalLight(GLuint shadow_width, GLuint shadow_height, GLfloat red, GLfloat green, GLfloat blue, GLfloat radiance, GLfloat x_dir, GLfloat y_dir, GLfloat z_dir, GLfloat near_plane, GLfloat far_plane, int num_cascades)
glm::mat4 calculate_light_transform()
inline std::shared_ptr<CascadedShadowMap> get_shadow_map() const
glm::vec3 get_direction() const
glm::vec3 get_color() const
float get_radiance() const
glm::mat4 get_light_view_matrix() const
std::vector<GLfloat> get_cascaded_slots() const
std::vector<glm::mat4> &get_cascaded_light_matrices()
void set_direction(glm::vec3 direction)
void set_radiance(float radiance)
void set_color(glm::vec3 color)
void update_shadow_map(GLfloat shadow_width, GLfloat shadow_height, GLuint num_cascades)
void calc_orthogonal_projections(glm::mat4 camera_view_matrix, GLfloat fov, GLuint window_width, GLuint window_height, GLuint current_num_cascades)
~DirectionalLight()