Define constructors for Object and Shape; move a bunch of Sphere code to object_sphere

This commit is contained in:
Eryn Wells 2013-09-10 15:45:13 -07:00
parent f062efc349
commit e5601e7f43
2 changed files with 38 additions and 69 deletions

View file

@ -17,8 +17,9 @@ class Object
{
public:
Object();
Object(Vector3 o);
Vector3 get_origin();
Vector3 get_origin() const;
void set_origin(Vector3 v);
private:
@ -30,6 +31,9 @@ class Shape
: public Object
{
public:
Shape();
Shape(Vector3 o);
virtual int does_intersect(const Ray &ray, float **t) = 0;
virtual Vector3 compute_normal(const Vector3 &p) = 0;
};