matrix: add affine scale implementation
This commit is contained in:
parent
af3adb9ff1
commit
ede1203ff7
14
matrix.cpp
14
matrix.cpp
@ -515,6 +515,20 @@ matrix<T>::translate (util::vector<3,T> v)
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
matrix<T>
|
||||
matrix<T>::scale (util::vector<3,T> v)
|
||||
{
|
||||
return { {
|
||||
{ v.x, 0.f, 0.f, 0.f },
|
||||
{ 0.f, v.y, 0.f, 0.f },
|
||||
{ 0.f, 0.f, v.z, 0.f },
|
||||
{ 0.f, 0.f, 0.f, 1.f }
|
||||
} };
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
const matrix<T>
|
||||
|
Loading…
Reference in New Issue
Block a user