Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/height_map/src/world_entities/environment.cc @ 6685

Last change on this file since 6685 was 5994, checked in by bensch, 19 years ago

orxonox/trunk: much cleaner Model Loading unloading, model is now private to WorldEntity (not protected)

File size: 1.6 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific
14   main-programmer: Patrick Boenzli
15   co-programmer:
16*/
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
18
19
20#include "environment.h"
21
22#include "resource_manager.h"
23
24#include "vector.h"
25#include "objModel.h"
26#include "obb_tree.h"
27#include "factory.h"
28
29using namespace std;
30CREATE_FACTORY(Environment, CL_ENVIRONMENT);
31
32/**
33 *  creates an environment
34*/
35Environment::Environment () : WorldEntity()
36{
37  this->init();
38  this->loadModel("models/ships/bolido.obj");
39}
40
41/**
42 * create an environment out of a XML-element
43 * @param root the XML-element to load the Environment from
44 */
45Environment::Environment(const TiXmlElement* root)
46{
47  this->init();
48  if (root != NULL)
49    this->loadParams(root);
50}
51
52/**
53 *  deletes an environment
54*/
55Environment::~Environment ()
56{}
57
58/**
59 * initialize an Environment
60 */
61void Environment::init()
62{
63  this->setClassID(CL_ENVIRONMENT, "Environment");
64}
65
66/**
67 * loads the Settings of an Environment from an XML-element.
68 * @param root the XML-element to load the ELements properties from
69 */
70void Environment::loadParams(const TiXmlElement* root)
71{
72  static_cast<WorldEntity*>(this)->loadParams(root);
73}
74
75
76/**
77 *  ticks the environment
78 * @param time the time about which to tick
79*/
80void Environment::tick (float time) {}
81
82
Note: See TracBrowser for help on using the repository browser.