Clean up constructors for Object and Sphere

Use default arguments instead of multiple constructors. I forgot about those! Use Vector4s all around.
This commit is contained in:
Eryn Wells 2014-08-09 08:57:41 -07:00
parent 8ccfbc0498
commit ab9ac5e963
4 changed files with 28 additions and 49 deletions

View file

@ -12,32 +12,26 @@
#include "basics.h"
#include "material.h"
#include "object.h"
#include "basics/basics.hh"
using charles::basics::Vector4;
namespace charles {
#pragma mark - Objects
/*
* Object::Object --
*
* Default constructor. Create a new Object with an origin at (0, 0, 0).
*/
Object::Object()
: Object(Vector3::Zero)
{ }
/*
* Object::Object --
*
* Constructor. Create a new Object with an origin at o.
*/
Object::Object(Vector3 origin)
: mOrigin(origin),
Object::Object(const Vector4& origin)
: mTranslation(basics::TranslationMatrix(origin.X(), origin.Y(), origin.Z())),
mMaterial()
{ }
/*
*/
Vector3
Object::GetOrigin()
const