charles/src/object.cc

69 lines
898 B
C++
Raw Normal View History

2013-09-07 16:09:19 -07:00
/* object.c
*
* Definition of generic scene objects.
2013-09-07 16:09:19 -07:00
*
* Eryn Wells <eryn@erynwells.me>
*/
#include <cassert>
#include <cmath>
#include <cstdlib>
2013-09-07 22:22:27 -07:00
2013-09-07 16:48:50 -07:00
#include "basics.h"
#include "material.h"
2013-09-07 16:09:19 -07:00
#include "object.h"
#include "basics/basics.hh"
using charles::basics::Vector4;
2013-09-07 16:09:19 -07:00
namespace charles {
#pragma mark - Objects
2013-09-07 16:48:50 -07:00
Object::Object(const Vector4& origin)
: mTranslation(basics::TranslationMatrix(origin.X(), origin.Y(), origin.Z())),
mMaterial()
{ }
/*
2014-08-09 08:59:11 -07:00
* charles::Object::~Object --
*/
Object::~Object()
{ }
2013-09-07 18:26:32 -07:00
Material&
Object::GetMaterial()
{
return mMaterial;
}
void
Object::SetMaterial(const Material& material)
{
mMaterial = material;
}
void
Object::Write(std::ostream& ost)
const
{
ost << "[Object]";
}
std::ostream&
operator<<(std::ostream& ost,
const Object& object)
{
object.Write(ost);
return ost;
}
} /* namespace charles */