Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cd/src/subprojects/collision_detection/collision_test_entity.cc @ 7533

Last change on this file since 7533 was 7533, checked in by patrick, 18 years ago

collision: subproject up

File size: 1.8 KB
RevLine 
[4597]1/*
[1883]2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
[2036]11   ### File Specific
12   main-programmer: Patrick Boenzli
[4597]13   co-programmer:
[1883]14*/
[5357]15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
[1883]16
17
[5486]18#include "collision_test_entity.h"
[5143]19
[7193]20#include "util/loading/resource_manager.h"
[5143]21
[2816]22#include "vector.h"
[3484]23#include "objModel.h"
[4682]24#include "obb_tree.h"
[7193]25#include "util/loading/factory.h"
[1883]26
27using namespace std;
[5750]28CREATE_FACTORY(CollisionTestEntity, CL_ENVIRONMENT);
[1883]29
[4490]30/**
[4836]31 *  creates an environment
[4490]32*/
[7533]33CollisionTestEntity::CollisionTestEntity (const char* modelName) : WorldEntity()
[1883]34{
[5361]35  this->init();
[7533]36  this->loadModel(modelName);
[5687]37  //  this->loadModel("models/ships/figther.obj");
[4682]38
[5487]39  this->buildObbTree(10);
[1883]40}
41
[5361]42/**
43 * create an environment out of a XML-element
[5486]44 * @param root the XML-element to load the CollisionTestEntity from
[5361]45 */
[5486]46CollisionTestEntity::CollisionTestEntity(const TiXmlElement* root)
[5361]47{
48  this->init();
49  if (root != NULL)
50    this->loadParams(root);
51}
[1883]52
[4490]53/**
[4836]54 *  deletes an environment
[4490]55*/
[5486]56CollisionTestEntity::~CollisionTestEntity ()
[5047]57{}
[3566]58
[5361]59/**
[5486]60 * initialize an CollisionTestEntity
[5361]61 */
[5486]62void CollisionTestEntity::init()
[5361]63{
[5486]64  this->setClassID(CL_ENVIRONMENT, "CollisionTestEntity");
[5361]65}
[1883]66
[4490]67/**
[5486]68 * loads the Settings of an CollisionTestEntity from an XML-element.
[5361]69 * @param root the XML-element to load the ELements properties from
70 */
[5486]71void CollisionTestEntity::loadParams(const TiXmlElement* root)
[5361]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*/
[5486]81void CollisionTestEntity::tick (float time) {}
[1883]82
Note: See TracBrowser for help on using the repository browser.