eqemu

view src/object.cc @ 5:9b5bb05ae53a

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 00:42:15 +0300
parents f9274bebe55e
children 2656099aff12
line source
1 #include "object.h"
3 Object::Object()
4 {
5 mesh = 0;
6 }
8 void Object::set_name(const char *name)
9 {
10 this->name = std::string(name);
11 }
13 const char *Object::get_name() const
14 {
15 return name.c_str();
16 }
18 void Object::set_mesh(Mesh *mesh)
19 {
20 this->mesh = mesh;
21 }
23 Mesh *Object::get_mesh() const
24 {
25 return mesh;
26 }
28 void Object::render() const
29 {
30 if(!mesh) return;
32 mtl.setup();
33 mesh->draw();
34 }