Set material to NULL in Shape

This commit is contained in:
Eryn Wells 2014-07-19 15:41:17 -07:00
parent 573f53b67c
commit 0a14661da8
2 changed files with 5 additions and 4 deletions

View file

@ -49,7 +49,7 @@ Object::get_origin()
}
void
Object::set_origin(Vector3 v)
Object::set_origin(const Vector3& v)
{
origin = v;
}
@ -71,7 +71,7 @@ operator<<(std::ostream &os, const Object &o)
* Default constructor. Create a new Shape with an origin at (0, 0, 0).
*/
Shape::Shape()
: Object()
: Shape(Vector3::Zero)
{ }
@ -81,7 +81,8 @@ Shape::Shape()
* Constructor. Create a new Shape with an origin at o.
*/
Shape::Shape(Vector3 o)
: Object(o)
: Object(o),
material(NULL)
{ }

View file

@ -23,7 +23,7 @@ public:
Object(Vector3 o);
Vector3 get_origin() const;
void set_origin(Vector3 v);
void set_origin(const Vector3& v);
friend std::ostream &operator<<(std::ostream &os, const Object &o);