fart/util/Transform.h
Josh Holtrop 866f22a637 added operator*(Vector,double) and operator/(Vector,double) to util/Vector; added lookAt() to util/Transform (needs testing)
git-svn-id: svn://anubis/fart/trunk@63 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-28 23:47:46 +00:00

34 lines
810 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();
Transform getInverse();
void lookAt(const Vector & eye,
const Vector & focus,
const Vector & up);
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; }
Vector transform_point(const Vector & v);
Vector transform_direction(const Vector & v);
Vector transform_normal(const Vector & v);
Ray transform_ray(const Ray & r);
protected:
Matrix m_matrix;
};
#endif