8 #ifndef _MBS_SPOT_LIGHT_HH_
9 #define _MBS_SPOT_LIGHT_HH_
17 class MbsSpotLight:
public MbsPointLight
20 MbsSpotLight(glm::vec3
const& rel_pos = glm::vec3(0.0f),
21 glm::vec3
const& attenuation = glm::vec3(1.0f, 0.0f, 0.0f),
22 glm::vec3
const& rel_dir = glm::vec3(0.0f, 0.0f, -1.0f),
23 glm::mat4
const& parent_mat = glm::mat4(1.0f),
24 glm::vec3
const& color = glm::vec3(1.0f),
25 float ambient = 0.05f,
26 float spread_angle = 3.1415927f,
27 float concentration = 0.0f,
29 int depth_x_width = 1024,
int depth_y_width = 1024,
float shadow_bias = 0.0f,
30 float depth_near = 0.1f,
float depth_far = 100.0f,
31 glm::vec3
const& shadow_z_up = glm::vec3(0.0, 0.0, 1.0),
32 float depth_FoV_rad = 1.0f);
33 virtual ~MbsSpotLight();
35 virtual void Update();
38 glm::vec3 GetNormDir()
const {
return norm_dir; }
41 float GetSpreadAngle()
const {
return spread_angle; }
44 float GetConcentration()
const {
return concentration; }
47 void UpdateRelDir(glm::vec3
const& rel_dir)
49 this->rel_dir = rel_dir;
50 rel_dir_4 = glm::vec4(rel_dir, 0.0f);
56 virtual void UpdateParentPos(glm::mat4
const& parent_mat)
58 MbsPointLight::UpdateParentPos(parent_mat);