Added normal matrices to transformable
This commit is contained in:
parent
b3e82ca9df
commit
862ef6d34b
3 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue