MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / update

Method update

src/Scene/Light.cpp:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48
49void Light::update() {
50 orientation_vec = glm::vec3(0,0,0);
51 orientation = glm::normalize(glm::quat(orientation_vec));
52 RotationMatrix = glm::toMat4(orientation);
53 //Rotate around center
54 TranslationMatrix = glm::translate(glm::mat4(1.0), glm::vec3(0,0,0));
55 ModelMatrix = TranslationMatrix * RotationMatrix;
56
57 ViewMatrix = glm::lookAt(position, lookAt, glm::vec3(0,1.0,0));
58}
59
60void Light::destroy() {
61 glDeleteBuffers(1, &vertexbuffer);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected