diff --git a/src/object.cc b/src/object.cc index f786ed6..2e8a00f 100644 --- a/src/object.cc +++ b/src/object.cc @@ -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) { } diff --git a/src/object.h b/src/object.h index cda86ad..7d47586 100644 --- a/src/object.h +++ b/src/object.h @@ -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);