matrix: rename translate/rotate to translation/rotation
This commit is contained in:
parent
de48f75e96
commit
bb6678726f
@ -349,16 +349,16 @@ matrix<S,T>::look_at (util::point<3,T> eye,
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
matrix4<T>
|
matrix4<T>
|
||||||
matrix<S,T>::translate (util::vector<2,T> v)
|
matrix<S,T>::translation (util::vector<2,T> v)
|
||||||
{
|
{
|
||||||
return translate ({v.x, v.y, 0});
|
return translation ({v.x, v.y, 0});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
matrix4<T>
|
matrix4<T>
|
||||||
matrix<S,T>::translate (util::vector<3,T> v)
|
matrix<S,T>::translation (util::vector<3,T> v)
|
||||||
{
|
{
|
||||||
return { {
|
return { {
|
||||||
{ 1.f, 0.f, 0.f, v.x },
|
{ 1.f, 0.f, 0.f, v.x },
|
||||||
@ -394,7 +394,7 @@ matrix<S,T>::scale (util::vector<3,T> v)
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
template <size_t S, typename T>
|
template <size_t S, typename T>
|
||||||
matrix4<T>
|
matrix4<T>
|
||||||
matrix<S,T>::rotate (T angle, util::vector<3,T> about)
|
matrix<S,T>::rotation (T angle, util::vector<3,T> about)
|
||||||
{
|
{
|
||||||
about.normalise ();
|
about.normalise ();
|
||||||
|
|
||||||
|
@ -70,11 +70,11 @@ namespace util {
|
|||||||
static matrix<4,T> look_at (point<3,T> eye, point<3,T> centre, vector<3,T> up);
|
static matrix<4,T> look_at (point<3,T> eye, point<3,T> centre, vector<3,T> up);
|
||||||
|
|
||||||
// Affine matrices
|
// Affine matrices
|
||||||
static matrix<4,T> translate (util::vector<2,T>);
|
static matrix<4,T> translation (util::vector<2,T>);
|
||||||
static matrix<4,T> translate (util::vector<3,T>);
|
static matrix<4,T> translation (util::vector<3,T>);
|
||||||
static matrix<4,T> scale (util::vector<3,T>);
|
static matrix<4,T> scale (util::vector<3,T>);
|
||||||
static matrix<4,T> scale (T);
|
static matrix<4,T> scale (T);
|
||||||
static matrix<4,T> rotate (T angle, util::vector<3,T> about);
|
static matrix<4,T> rotation (T angle, util::vector<3,T> about);
|
||||||
|
|
||||||
// Constant matrices
|
// Constant matrices
|
||||||
static const matrix IDENTITY;
|
static const matrix IDENTITY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user