Added normal matrices to transformable

This commit is contained in:
Robert 2021-01-26 15:36:57 +01:00
parent b3e82ca9df
commit 862ef6d34b
3 changed files with 15 additions and 1 deletions

View file

@ -197,6 +197,11 @@ namespace oglu
return transformation;
}
glm::mat3 Transformable::GetNormalMatrix()
{
return glm::mat3(glm::transpose(glm::inverse(GetMatrix())));
}
const glm::vec3& Transformable::GetPosition() const
{
return translation;