eqemu

view src/object.cc @ 4:3d3656360a82

rendering properly, added picking, almost done...
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 17 Jul 2014 08:51:17 +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 }