8 #ifndef _MBS_POINT_LIGHT_HH_
9 #define _MBS_POINT_LIGHT_HH_
15 class MbsPointLight:
public MbsLight
18 MbsPointLight(glm::vec3
const& rel_pos = glm::vec3(0.0f),
19 glm::vec3
const& attenuation = glm::vec3(1.0f, 0.0f, 0.0f),
20 glm::mat4
const& parent_mat = glm::mat4(1.0f),
21 glm::vec3
const& color = glm::vec3(1.0f),
22 float ambient = 0.05f,
24 int depth_x_width = 1024,
int depth_y_width = 1024,
float shadow_bias = 0.0f,
25 float depth_near = 0.1f,
float depth_far = 100.0f,
26 glm::vec3
const& shadow_z_up = glm::vec3(0.0, 0.0, 1.0),
27 float depth_FoV_rad = 1.0f,
28 glm::vec3
const& shadow_rel_dir = glm::vec3(0.0f, -1.0f, 0.0f));
29 virtual ~MbsPointLight();
31 virtual void Update();
34 glm::vec3 GetPos()
const {
return pos; }
37 glm::vec3 GetAttenuation()
const {
return attenuation; }
40 void UpdateRelPos(glm::vec3
const& rel_pos)
42 this->rel_pos = rel_pos;
48 virtual void UpdateParentPos(glm::mat4
const& parent_mat)
50 MbsLight::UpdateParentPos(parent_mat);
56 glm::vec3 attenuation;
65 glm::vec4 shadow_rel_dir_4;