Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8186 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Jun 7, 2006, 2:40:46 PM (18 years ago)
Author:
bensch
Message:

trunk: merged the branche bsp_model back here

Location:
trunk/src/lib
Files:
4 edited
8 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/cd_engine.cc

    r7739 r8186  
    2929#include "quadtree_node.h"
    3030
    31 
     31#include "bsp_manager.h"
    3232
    3333using namespace std;
     
    9595 *  this checks the collisions with the ground
    9696 */
    97 void CDEngine::checkCollisionGround()
     97void CDEngine::checkCollisionGround(std::list<WorldEntity*>& list1)
    9898{
    9999  if( likely( this->terrain != NULL))
    100100  {
    101101    Quadtree* q = dynamic_cast<Terrain*>(this->terrain)->ssp->getQuadtree();
    102 
    103102//    QuadtreeNode* n = q->getQuadtreeFromPosition(this->player->getAbsCoor());
    104103  }
    105   //sTriangleExt* tri = q->getTriangleFromPosition(this->player->getAbsCoor());
     104 
     105  if( likely( this->bspManager != NULL))
     106  {
     107    std::list<WorldEntity*>::iterator iterator;
     108    PRINTF(3)("checking for collisions\n");
     109
     110    iterator = list1.begin();
     111    while (iterator != list1.end())
     112    {
     113      bspManager->checkCollision(*iterator);
     114      iterator++;
     115    }
     116  }
    106117}
    107118
  • trunk/src/lib/collision_detection/cd_engine.h

    r7739 r8186  
    1717class OBBTree;
    1818class Terrain;
     19class BspManager;
    1920//class Player;
    2021
     
    5051
    5152  inline void setTerrain(Terrain* terrain) { this->terrain = terrain; }
     53  inline void setBSPModel(BspManager* bspManager) { this->bspManager = bspManager; }
    5254
    5355  void checkCollisions(std::list<WorldEntity*>& list1, std::list<WorldEntity*>& list2);
     56  void checkCollisionGround(std::list<WorldEntity*>& list1);
    5457
    5558  void drawBV(const std::list<WorldEntity*>& drawList, int level) const;
     
    6972
    7073  void checkCollisionObjects();
    71   void checkCollisionGround();
     74
    7275
    7376  void debugSpawnTree(int depth, sVec3D* vertices, int numVertices);
     
    8184
    8285  Terrain*                terrain;                          //!< this it a ref to the terrain, serving as a ground for all WE
     86  BspManager*             bspManager;
    8387};
    8488
  • trunk/src/lib/coord/p_node.h

    r7954 r8186  
    191191  /** tells the child that the parent's Direction has changed */
    192192  inline void parentDirChanged () { this->bRelDirChanged = true; }
     193 public:
    193194  /** @returns the last calculated coordinate */
    194195  inline Vector getLastAbsCoor() { return this->lastAbsCoordinate; }
    195 
     196 private:
    196197  static PNode* createNullParent();
    197198  void reparent();
  • trunk/src/lib/graphics/importer/Makefile.am

    r6532 r8186  
    1616                           height_map.cc \
    1717                           media_container.cc \
    18                            movie_player.cc
     18                           movie_player.cc \
     19                           \
     20                           bsp_manager.cc \
     21                           bsp_file.cc \
     22                           bsp_tree_node.cc \
     23                           bsp_tree_leaf.cc
     24
     25
    1926
    2027libtc_a_SOURCES  = tc.cc
    2128
    2229
    23 noinst_HEADERS = model.h \
    24                  tc.h \
    25                  vertex_array_model.h \
    26                  grid.h \
    27                  static_model.h \
    28                  objModel.h \
    29                  primitive_model.h \
    30                  md2Model.h \
    31                  material.h \
    32                  texture.h \
    33                  texture_sequence.h \
    34                  height_map.h \
    35                  anorms.h \
    36                  anormtab.h \
    37                  media_container.h \
    38                  movie_player.h
     30noinst_HEADERS = \
     31                model.h \
     32                tc.h \
     33                vertex_array_model.h \
     34                grid.h \
     35                static_model.h \
     36                objModel.h \
     37                primitive_model.h \
     38                md2Model.h \
     39                material.h \
     40                texture.h \
     41                texture_sequence.h \
     42                height_map.h \
     43                anorms.h \
     44                anormtab.h \
     45                media_container.h \
     46                movie_player.h\
     47                \
     48                bsp_manager.h \
     49                bsp_file.h \
     50                bsp_tree_node.h \
     51                bsp_tree_leaf.h
Note: See TracChangeset for help on using the changeset viewer.