fart/shapes/Shape.h
Josh Holtrop 761925220b added getNormalAt() to Shape & Sphere, trying to get basic lighting
git-svn-id: svn://anubis/fart/trunk@44 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-23 18:09:27 +00:00

24 lines
477 B
C++

#ifndef SHAPE_H
#define SHAPE_H SHAPE_H
#include "util/Solver.h"
#include "util/Ray.h"
#include "util/Vector.h"
#include "util/Transform.h"
class Shape
{
public:
virtual Solver::Result intersect(const Ray & ray) = 0;
void setTransform(const Transform & t) { m_transform = t; }
Transform & getTransform() { return m_transform; }
virtual Vector getNormalAt(const Vector & pt) = 0;
protected:
Transform m_transform;
};
#endif