rayzor

view src/scene.cc @ 5:5fcf72837b69

fixed the dosemu bit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Apr 2014 02:43:24 +0300
parents a826bf0fb169
children a68dbf80d547
line source
1 #include <string.h>
2 #include "scene.h"
4 Scene::Scene()
5 {
6 name = 0;
7 }
9 Scene::~Scene()
10 {
11 clear();
12 }
14 void Scene::clear()
15 {
16 delete [] name;
18 size_t i;
19 for(i=0; i<objects.size(); i++) {
20 delete objects[i];
21 }
22 for(i=0; i<lights.size(); i++) {
23 delete lights[i];
24 }
25 for(i=0; i<cameras.size(); i++) {
26 delete cameras[i];
27 }
28 }
30 void Scene::set_name(const char *name)
31 {
32 delete [] this->name;
33 this->name = new char[strlen(name) + 1];
34 strcpy(this->name, name);
35 }
37 const char *Scene::get_name() const
38 {
39 return name ? name : "<unknown>";
40 }
42 void Scene::draw() const
43 {
44 }