Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/environments/environment.cc @ 10675

Last change on this file since 10675 was 10618, checked in by bknecht, 18 years ago

merged cleanup into trunk (only improvements)

File size: 1.7 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
[10033]22#include "obj/objModel.h"
[4682]23#include "obb_tree.h"
[7193]24#include "util/loading/factory.h"
[1883]25
[10114]26
27ObjectListDefinition(Environment);
[9869]28CREATE_FACTORY(Environment);
[9406]29
[4490]30/**
[4836]31 *  creates an environment
[4490]32*/
[2816]33Environment::Environment () : WorldEntity()
[1883]34{
[5361]35  this->init();
[5308]36  this->loadModel("models/ships/bolido.obj");
[7711]37//   if(this->obbTree == NULL)
38//     this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
[1883]39}
40
[5361]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}
[1883]51
[4490]52/**
[4836]53 *  deletes an environment
[4490]54*/
[4597]55Environment::~Environment ()
[5047]56{}
[3566]57
[5361]58/**
59 * initialize an Environment
60 */
61void Environment::init()
62{
[9869]63  this->registerObject(this, Environment::_objectList);
[6142]64  this->toList(OM_ENVIRON);
[5361]65}
[1883]66
[4490]67/**
[5361]68 * loads the Settings of an Environment from an XML-element.
69 * @param root the XML-element to load the ELements properties from
70 */
71void Environment::loadParams(const TiXmlElement* root)
72{
[6512]73  WorldEntity::loadParams(root);
[5361]74}
75
76
77/**
[4836]78 *  ticks the environment
79 * @param time the time about which to tick
[4490]80*/
[2816]81void Environment::tick (float time) {}
[1883]82
[2816]83
Note: See TracBrowser for help on using the repository browser.