[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" |
---|
[10033] | 23 | #include "obj/objModel.h" |
---|
[4682] | 24 | #include "obb_tree.h" |
---|
[7193] | 25 | #include "util/loading/factory.h" |
---|
[1883] | 26 | |
---|
[9406] | 27 | |
---|
[5750] | 28 | CREATE_FACTORY(CollisionTestEntity, CL_ENVIRONMENT); |
---|
[1883] | 29 | |
---|
[4490] | 30 | /** |
---|
[4836] | 31 | * creates an environment |
---|
[4490] | 32 | */ |
---|
[7711] | 33 | CollisionTestEntity::CollisionTestEntity (const char* modelName) : WorldEntity() |
---|
[1883] | 34 | { |
---|
[5361] | 35 | this->init(); |
---|
[7711] | 36 | this->loadModel(modelName, 1.0f, 0, 10); |
---|
| 37 | /* this->buildObbTree(0);*/ |
---|
[4682] | 38 | |
---|
[1883] | 39 | } |
---|
| 40 | |
---|
[5361] | 41 | /** |
---|
| 42 | * create an environment out of a XML-element |
---|
[5486] | 43 | * @param root the XML-element to load the CollisionTestEntity from |
---|
[5361] | 44 | */ |
---|
[5486] | 45 | CollisionTestEntity::CollisionTestEntity(const TiXmlElement* root) |
---|
[5361] | 46 | { |
---|
| 47 | this->init(); |
---|
| 48 | if (root != NULL) |
---|
| 49 | this->loadParams(root); |
---|
| 50 | } |
---|
[1883] | 51 | |
---|
[4490] | 52 | /** |
---|
[4836] | 53 | * deletes an environment |
---|
[4490] | 54 | */ |
---|
[5486] | 55 | CollisionTestEntity::~CollisionTestEntity () |
---|
[5047] | 56 | {} |
---|
[3566] | 57 | |
---|
[5361] | 58 | /** |
---|
[5486] | 59 | * initialize an CollisionTestEntity |
---|
[5361] | 60 | */ |
---|
[5486] | 61 | void CollisionTestEntity::init() |
---|
[5361] | 62 | { |
---|
[5486] | 63 | this->setClassID(CL_ENVIRONMENT, "CollisionTestEntity"); |
---|
[5361] | 64 | } |
---|
[1883] | 65 | |
---|
[4490] | 66 | /** |
---|
[5486] | 67 | * loads the Settings of an CollisionTestEntity from an XML-element. |
---|
[5361] | 68 | * @param root the XML-element to load the ELements properties from |
---|
| 69 | */ |
---|
[5486] | 70 | void CollisionTestEntity::loadParams(const TiXmlElement* root) |
---|
[5361] | 71 | { |
---|
[6512] | 72 | WorldEntity::loadParams(root); |
---|
[5361] | 73 | } |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | /** |
---|
[4836] | 77 | * ticks the environment |
---|
| 78 | * @param time the time about which to tick |
---|
[4490] | 79 | */ |
---|
[5486] | 80 | void CollisionTestEntity::tick (float time) {} |
---|
[1883] | 81 | |
---|