Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8218 in orxonox.OLD


Ignore:
Timestamp:
Jun 7, 2006, 10:07:54 PM (18 years ago)
Author:
patrick
Message:

bsp: changed the BSPEntity name to BspEntity for more consistency, using new interface

Location:
branches/bsp_model/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/collision_detection/cd_engine.cc

    r8217 r8218  
    109109  for( bspIterator = bspList->begin(); bspIterator != bspList->end(); bspIterator++) {
    110110      for(entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++)
    111         (static_cast<BspEntity*>(*bspIterator)->getBspManager())->checkCollision(*entityIterator);
     111        (dynamic_cast<BspEntity*>(*bspIterator)->getBspManager())->checkCollision(*entityIterator);
    112112  }
    113113}
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc

    r8217 r8218  
    918918   if(collision)
    919919     worldEntity->registerCollision(worldEntity, Vector(this->collPlane->x, this->collPlane->y, this->collPlane->z), out);
    920 
    921 }
     920}
     921
    922922
    923923void  BspManager::checkCollision(BspTreeNode* node, Vector* cam)
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.h

    r8217 r8218  
    6464
    6565
    66   void checkCollision(WorldEntity* worldEntity); /*!< WorldEntities use this function to check wheter they collided with the BSPEntity.
     66  void checkCollision(WorldEntity* worldEntity); /*!< WorldEntities use this function to check wheter they collided with the BspEntity.
    6767                                                      If a collision has been detected, the collides-function of worldEntity will be called.*/
    6868
  • branches/bsp_model/src/world_entities/bsp_entity.cc

    r8195 r8218  
    1717#include "util/loading/resource_manager.h"
    1818
    19 CREATE_FACTORY(BSPEntity, CL_BSP_ENTITY);
     19CREATE_FACTORY(BspEntity, CL_BSP_ENTITY);
    2020
    2121
    2222/**
    23  * constructs and loads a BSPEntity from a XML-element
     23 * constructs and loads a BspEntity from a XML-element
    2424 * @param root the XML-element to load from
    2525 */
    26 BSPEntity::BSPEntity(const TiXmlElement* root)
     26BspEntity::BspEntity(const TiXmlElement* root)
    2727{
    2828  this->init();
     
    3535 * standard deconstructor
    3636 */
    37 BSPEntity::~BSPEntity ()
     37BspEntity::~BspEntity ()
    3838{
    3939
    4040}
    4141
    42 void BSPEntity::setName(const std::string& name)
     42void BspEntity::setName(const std::string& name)
    4343{
    4444  printf("+++++++++++ LOADING NAME %s\n", name.c_str());
     
    5050
    5151/**
    52  * initializes the BSPEntity
     52 * initializes the BspEntity
    5353 * @todo change this to what you wish
    5454 */
    55 void BSPEntity::init()
     55void BspEntity::init()
    5656{
    5757  this->bspManager = new BspManager();
    58   this->setClassID(CL_BSP_ENTITY, "BSPEntity");
     58  this->setClassID(CL_BSP_ENTITY, "BspEntity");
    5959
    6060  this->toList(OM_ENVIRON);
     
    6868
    6969/**
    70  * loads a BSPEntity from a XML-element
     70 * loads a BspEntity from a XML-element
    7171 * @param root the XML-element to load from
    7272 * @todo make the class Loadable
    7373 */
    74 void BSPEntity::loadParams(const TiXmlElement* root)
     74void BspEntity::loadParams(const TiXmlElement* root)
    7575{
    7676  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
    7777 // WorldEntity::loadParam(root);
    7878
    79   LoadParam(root, "Name", this, BSPEntity, setName)
     79  LoadParam(root, "Name", this, BspEntity, setName)
    8080      .describe("Sets the of the BSP file.");
    8181
     
    9191
    9292/**
    93  * advances the BSPEntity about time seconds
     93 * advances the BspEntity about time seconds
    9494 * @param time the Time to step
    9595 */
    96 void BSPEntity::tick(float time)
     96void BspEntity::tick(float time)
    9797{
    9898  this->bspManager->tick(time);
     
    103103 * draws this worldEntity
    104104 */
    105 void BSPEntity::draw () const
     105void BspEntity::draw () const
    106106{
    107107  this->bspManager->draw();
     
    113113 *
    114114 */
    115 void BSPEntity::collidesWith (WorldEntity* entity, const Vector& location)
     115void BspEntity::collidesWith (WorldEntity* entity, const Vector& location)
    116116{
    117117
  • branches/bsp_model/src/world_entities/bsp_entity.h

    r8217 r8218  
    1616
    1717//! A Class to ...
    18 class BSPEntity : public WorldEntity
     18class BspEntity : public WorldEntity
    1919{
    2020
    2121 public:
    22   BSPEntity(const TiXmlElement* root = NULL);
    23   virtual ~BSPEntity();
     22  BspEntity(const TiXmlElement* root = NULL);
     23  virtual ~BspEntity();
    2424
    2525  virtual void loadParams(const TiXmlElement* root);
Note: See TracChangeset for help on using the changeset viewer.