Set material to NULL in Shape
This commit is contained in:
parent
573f53b67c
commit
0a14661da8
2 changed files with 5 additions and 4 deletions
|
@ -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)
|
||||
{ }
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue