matrix: add scalar scaling matrix

This commit is contained in:
Danny Robson 2015-01-19 19:12:44 +11:00
parent 31b3e5ab68
commit ca66f831f7
2 changed files with 9 additions and 0 deletions

View File

@ -491,6 +491,14 @@ matrix<T>::translate (util::vector<3,T> v)
}
//-----------------------------------------------------------------------------
template <typename T>
matrix<T>
matrix<T>::scale (T mag)
{
return scale (vector<3,T> (mag));
}
//-----------------------------------------------------------------------------
template <typename T>
matrix<T>

View File

@ -65,6 +65,7 @@ namespace util {
// Affine matrices
static matrix<T> translate (util::vector<3,T>);
static matrix<T> scale (util::vector<3,T>);
static matrix<T> scale (T);
static matrix<T> rotate (T angle, util::vector<3,T> about);
// Constant matrices