rayzor

view src/scene.cc @ 2:c273c6f799a4

added fixcase utility to fix the ftp-ed files' case on linux
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 05 Apr 2014 18:31:00 +0300
parents 2a5340a6eee4
children 5fcf72837b69
line source
1 #include "scene.h"
3 Scene::Scene()
4 {
5 name = 0;
6 }
8 Scene::~Scene()
9 {
10 clear();
11 }
13 void Scene::clear()
14 {
15 delete [] name;
17 size_t i;
18 for(i=0; i<objects.size(); i++) {
19 delete objects[i];
20 }
21 for(i=0; i<lights.size(); i++) {
22 delete lights[i];
23 }
24 for(i=0; i<cameras.size(); i++) {
25 delete cameras[i];
26 }
27 }
29 void Scene::set_name(const char *name)
30 {
31 delete [] this->name;
32 this->name = new char[strlen(name) + 1];
33 strcpy(this->name, name);
34 }
36 const char *Scene::get_name() const
37 {
38 return name ? name : "<unknown>";
39 }
41 void Scene::draw() const
42 {
43 }