Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2006, 2:52:28 PM (18 years ago)
Author:
bensch
Message:

new_class_id: CDengine adapted

Location:
branches/new_class_id/src/lib/collision_detection
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/collision_detection/aabb.cc

    r9406 r9687  
    2121
    2222
    23 
     23NewObjectListDefinition(AABB);
    2424/**
    2525 *  standard constructor
     
    2727AABB::AABB ()
    2828{
    29    this->setClassID(CL_OBB, "AABB");
     29  this->registerObject(this, AABB::_objectList);
    3030   this->halfLength[0] = this->halfLength[1] = this->halfLength[2] = 0.0f;
    3131   this->bCollided = false;
  • branches/new_class_id/src/lib/collision_detection/aabb.h

    r8724 r9687  
    1111#include "bounding_volume.h"
    1212
    13 template<class T> class tList;
    14 
    1513//! A class representing an extended bounding volume tree: an obb tree
    1614class AABB : public BoundingVolume {
     15  NewObjectListDeclaration(AABB);
    1716
    1817 public:
  • branches/new_class_id/src/lib/collision_detection/aabb_tree_node.cc

    r9494 r9687  
    3232#include "debug.h"
    3333
    34 
    35 
    36 
    37 
    38 
    3934GLUquadricObj* AABBTreeNode_sphereObj = NULL;
    4035
    41 
     36NewObjectListDefinition(AABBTreeNode);
    4237/**
    4338 *  standard constructor
     
    4843    : BVTreeNode()
    4944{
    50   this->setClassID(CL_OBB_TREE_NODE, "AABBTreeNode");
     45  this->registerObject(this, AABBTreeNode::_objectList);
    5146
    5247  this->obbTree = &tree;
  • branches/new_class_id/src/lib/collision_detection/aabb_tree_node.h

    r8724 r9687  
    2121class AABBTreeNode : public BVTreeNode
    2222{
     23  NewObjectListDeclaration(AABBTreeNode);
    2324
    2425
  • branches/new_class_id/src/lib/collision_detection/bounding_sphere.cc

    r9406 r9687  
    2020
    2121
    22 
     22NewObjectListDefinition(BoundingSphere);
    2323/**
    2424 *  standard constructor
     
    2626BoundingSphere::BoundingSphere ()
    2727{
    28    this->setClassID(CL_BOUNDING_SPHERE, "BoundingSphere");
     28  this->registerObject(this, BoundingSphere::_objectList);
    2929}
    3030
  • branches/new_class_id/src/lib/collision_detection/bounding_sphere.h

    r5039 r9687  
    1 /*! 
     1/*!
    22 * @file bounding_sphere.h
    33  *  Definition of a bounding sphere
     
    1414//! A class representing an extended bounding volume tree: an sphere
    1515class BoundingSphere : public BoundingVolume {
     16  NewObjectListDeclaration(BoundingSphere);
    1617
    1718 public:
  • branches/new_class_id/src/lib/collision_detection/bounding_volume.cc

    r9406 r9687  
    2020
    2121
    22 
     22NewObjectListDefinition(BoundingVolume);
    2323/**
    2424 *  standard constructor
     
    2626BoundingVolume::BoundingVolume ()
    2727{
    28   this->setClassID(CL_BOUNDING_VOLUME, "BoundingVolume");
     28  this->registerObject(this, BoundingVolume::_objectList);
    2929  this->modelInf = NULL;
    3030  this->triangleIndexes = NULL;
  • branches/new_class_id/src/lib/collision_detection/bounding_volume.h

    r9008 r9687  
    1717//! An abstract class representing a bounding volume
    1818class BoundingVolume : public BaseObject {
     19  NewObjectListDeclaration(BoundingVolume);
    1920
    2021  public:
  • branches/new_class_id/src/lib/collision_detection/bv_tree.cc

    r9406 r9687  
    2121
    2222
    23 
     23NewObjectListDefinition(BVTree);
    2424/**
    2525 *  standard constructor
     
    2727BVTree::BVTree ()
    2828{
    29    this->setClassID(CL_BV_TREE, "BVTree");
     29  this->registerObject(this, BVTree::_objectList);
    3030
    3131}
  • branches/new_class_id/src/lib/collision_detection/bv_tree.h

    r7711 r9687  
    3636class BVTree : public BaseObject
    3737{
     38  NewObjectListDeclaration(BVTree);
    3839
    3940  public:
  • branches/new_class_id/src/lib/collision_detection/bv_tree_node.cc

    r9406 r9687  
    2020
    2121
    22 
     22NewObjectListDefinition(BVTreeNode);
    2323/**
    2424 *  standard constructor
     
    2626BVTreeNode::BVTreeNode ()
    2727{
    28    this->setClassID(CL_BV_TREE_NODE, "BVTreeNode");
     28  this->registerObject(this, BVTreeNode::_objectList);
    2929
    3030}
  • branches/new_class_id/src/lib/collision_detection/bv_tree_node.h

    r7732 r9687  
    2424//! A class that represents a bounding volume tree
    2525class BVTreeNode : public BaseObject {
     26  NewObjectListDeclaration(BVTreeNode);
    2627
    2728
  • branches/new_class_id/src/lib/collision_detection/cd_engine.cc

    r9406 r9687  
    2020#include "debug.h"
    2121
    22 #include "class_list.h"
    23 
    2422#include "model.h"
    2523#include "world_entity.h"
     
    3634
    3735
    38 
     36NewObjectListDefinition(CDEngine);
    3937/**
    40  * standard constructor
     38 * @brief standard constructor
    4139 */
    4240CDEngine::CDEngine ()
    4341{
    44   this->setClassID(CL_CD_ENGINE, "CDEngine");
     42  this->registerObject(this, CDEngine::_objectList);
    4543
    4644  this->bAbordOnFirstCollision = false;
     
    103101void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1)
    104102{
    105 
    106   std::list<BaseObject*>::const_iterator bspIterator;
    107103  std::list<WorldEntity*>::iterator entityIterator;
    108   const std::list<BaseObject*>* bspList = ClassList::getList(CL_BSP_ENTITY);
    109   if( bspList == NULL)
    110     return;
    111 
    112104  // for all bsp managers check all entities
    113   for( bspIterator = bspList->begin(); bspIterator != bspList->end(); bspIterator++) {
     105  for( NewObjectList<BspEntity>::const_iterator bspIterator = BspEntity::objectList().begin();
     106       bspIterator != BspEntity::objectList().end();
     107       bspIterator++) {
    114108      for(entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++)
    115109      {
  • branches/new_class_id/src/lib/collision_detection/cd_engine.h

    r8186 r9687  
    3636//! The class representing the collision detection system of orxonox
    3737class CDEngine : public BaseObject {
     38  NewObjectListDeclaration(CDEngine);
    3839
    3940  friend class WorldEntity;
  • branches/new_class_id/src/lib/collision_detection/obb.cc

    r9406 r9687  
    2121
    2222
    23 
     23NewObjectListDefinition(OBB);
    2424/**
    2525 *  standard constructor
     
    2727OBB::OBB ()
    2828{
    29    this->setClassID(CL_OBB, "OBB");
     29  this->registerObject(this, OBB::_objectList);
    3030   this->halfLength[0] = this->halfLength[1] = this->halfLength[2] = 0.0f;
    3131   this->bCollided = false;
  • branches/new_class_id/src/lib/collision_detection/obb.h

    r7711 r9687  
    1515//! A class representing an extended bounding volume tree: an obb tree
    1616class OBB : public BoundingVolume {
     17  NewObjectListDeclaration(OBB);
    1718
    1819 public:
  • branches/new_class_id/src/lib/collision_detection/obb_tree.cc

    r9406 r9687  
    2727
    2828
    29 
     29NewObjectListDefinition(OBBTree);
    3030/**
    3131 *  standard constructor
     
    5151void OBBTree::init()
    5252{
    53   this->setClassID(CL_OBB_TREE, "OBBTree");
     53  this->registerObject(this, OBBTree::_objectList);
    5454  this->rootNode = NULL;
    5555  this->id = 0;
  • branches/new_class_id/src/lib/collision_detection/obb_tree.h

    r9235 r9687  
    2020class OBBTree : public BVTree
    2121{
     22  NewObjectListDeclaration(OBBTree);
    2223
    2324  public:
  • branches/new_class_id/src/lib/collision_detection/obb_tree_node.cc

    r9406 r9687  
    3838GLUquadricObj* OBBTreeNode_sphereObj = NULL;
    3939
    40 
     40NewObjectListDefinition(OBBTreeNode);
    4141/**
    4242 *  standard constructor
     
    4747    : BVTreeNode()
    4848{
    49   this->setClassID(CL_OBB_TREE_NODE, "OBBTreeNode");
     49  this->registerObject(this, OBBTreeNode::_objectList);
    5050
    5151  this->obbTree = &tree;
     
    284284
    285285/**
    286  * calculate the eigenvectors for the object oriented box
     286 * @brief calculate the eigenvectors for the object oriented box
    287287 * @param box: reference to the box
    288288 * @param modelInf: the model info structure of the model
     
    361361
    362362/**
    363  * this separates an ob-box in the middle
     363 * @brief this separates an ob-box in the middle
    364364 * @param box: the box to separate
    365365 *
  • branches/new_class_id/src/lib/collision_detection/obb_tree_node.h

    r9235 r9687  
    1717class PNode;
    1818
    19 
    2019//! A class that represents a bounding volume tree
    2120class OBBTreeNode : public BVTreeNode
    2221{
    23 
    24 
     22  NewObjectListDeclaration(OBBTreeNode);
    2523  public:
    2624    OBBTreeNode(const OBBTree& tree, OBBTreeNode* prev, int depth);
Note: See TracChangeset for help on using the changeset viewer.