fart/util/Transform.cc
Josh Holtrop cd9530d21b filled in scale() transformation in util/Transform
git-svn-id: svn://anubis/fart/trunk@28 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-22 20:36:05 +00:00

31 lines
518 B
C++

#include "Transform.h"
Transform::Transform()
{
m_matrix = Matrix::identity();
}
void Transform::translate(double x, double y, double z)
{
Matrix t = Matrix::identity();
t[0][3] = x;
t[1][3] = y;
t[2][3] = z;
m_matrix *= t;
}
void Transform::rotate(double amt, double xv, double yv, double zv)
{
/* TODO: fill in */
}
void Transform::scale(double xs, double ys, double zs)
{
Matrix t = Matrix::identity();
t[0][0] = xs;
t[1][1] = ys;
t[2][2] = zs;
m_matrix *= t;
}