Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/world_entities/environment.cc @ 9716

Last change on this file since 9716 was 9716, checked in by bensch, 18 years ago

more renamings

File size: 1.8 KB
RevLine 
[1883]1
2
[4597]3/*
[1883]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
[2036]13   ### File Specific
14   main-programmer: Patrick Boenzli
[4597]15   co-programmer:
[1883]16*/
[5357]17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
[1883]18
19
20#include "environment.h"
[5143]21
[7193]22#include "util/loading/resource_manager.h"
[5143]23
[3484]24#include "objModel.h"
[4682]25#include "obb_tree.h"
[7193]26#include "util/loading/factory.h"
[1883]27
[9716]28#include "class_id_DEPRECATED.h"
[9715]29ObjectListDefinitionID(Environment, CL_ENVIRONMENT);
[9709]30CREATE_FACTORY(Environment);
[9406]31
[4490]32/**
[4836]33 *  creates an environment
[4490]34*/
[2816]35Environment::Environment () : WorldEntity()
[1883]36{
[5361]37  this->init();
[5308]38  this->loadModel("models/ships/bolido.obj");
[7711]39//   if(this->obbTree == NULL)
40//     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
[1883]41}
42
[5361]43/**
44 * create an environment out of a XML-element
45 * @param root the XML-element to load the Environment from
46 */
47Environment::Environment(const TiXmlElement* root)
48{
49  this->init();
50  if (root != NULL)
51    this->loadParams(root);
52}
[1883]53
[4490]54/**
[4836]55 *  deletes an environment
[4490]56*/
[4597]57Environment::~Environment ()
[5047]58{}
[3566]59
[5361]60/**
61 * initialize an Environment
62 */
63void Environment::init()
64{
[9709]65  this->registerObject(this, Environment::_objectList);
[6142]66  this->toList(OM_ENVIRON);
[5361]67}
[1883]68
[4490]69/**
[5361]70 * loads the Settings of an Environment from an XML-element.
71 * @param root the XML-element to load the ELements properties from
72 */
73void Environment::loadParams(const TiXmlElement* root)
74{
[6512]75  WorldEntity::loadParams(root);
[5361]76}
77
78
79/**
[4836]80 *  ticks the environment
81 * @param time the time about which to tick
[4490]82*/
[2816]83void Environment::tick (float time) {}
[1883]84
[2816]85
Note: See TracBrowser for help on using the repository browser.