13 delete _projectionMatrix;
21 void Light::Transform(glm::mat4 transformMatrix, glm::mat4 inverseTransformMatrix) {
23 *_position = glm::vec3(*
_modelMatrix * glm::vec4(0,0,0,1));
26 void Light::Transform_world(glm::mat4 transformMatrix, glm::mat4 inverseTransformMatrix) {
28 *_position = glm::vec3(*
_modelMatrix * glm::vec4(0,0,0,1));
33 _rotation_x += angle_x;
34 if (abs(_rotation_x)>75)
35 _rotation_x = glm::sign(_rotation_x)*75;
37 _rotation_y += angle_y;
38 if (abs(_rotation_y)>90)
39 _rotation_y = glm::sign(_rotation_y)*90;
42 glm::mat4 rot = glm::gtx::transform::rotate(_rotation_x,glm::vec3(1,0,0)) * glm::gtx::transform::rotate(_rotation_y,glm::vec3(0,1,0));;
43 glm::mat4 transl = glm::gtx::transform::translate(glm::vec3(0,0,dist));
48 *_position = glm::vec3(*
_modelMatrix * glm::vec4(0,0,0,1));
54 *_position = glm::vec3(0,0,0);
55 *_projectionMatrix = glm::perspective(35.0f,1.0f, nearPlane, farPlane);
60 return _projectionMatrix;