fart/util/Transform.h
Josh Holtrop 277252ef77 added transformation operations to util/Transform
git-svn-id: svn://anubis/fart/trunk@31 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-23 00:27:29 +00:00

29 lines
606 B
C++

#ifndef TRANSFORM_H
#define TRANSFORM_H TRANSFORM_H
#include "Matrix.h"
#include "Ray.h"
#include "Vector.h"
#include <stack>
class Transform
{
public:
Transform();
void translate(double x, double y, double z);
void rotate(double angle, double xv, double yv, double zv);
void scale(double xs, double ys, double zs);
Matrix & getMatrix() { return m_matrix; }
protected:
Matrix m_matrix;
};
Vector operator*(Transform & t, const Vector & v);
Vector operator%(Transform & t, const Vector & v);
Ray operator*(Transform & t, const Ray & r);
#endif