Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4615 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection


Ignore:
Timestamp:
Jun 13, 2005, 1:26:25 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: modified the cd subproject, so it loads an md2 file now. the polygons are rendered black, so the bounding box is not viewable! Must render them in another color:)

Location:
orxonox/trunk/src/lib/collision_detection
Files:
4 edited

Legend:

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

    r4551 r4615  
    1 /* 
     1/*
    22   orxonox - the future of 3D-vertical-scrollers
    33
     
    1919#include "obb_tree.h"
    2020#include "debug.h"
     21#include "abstract_model.h"
    2122
    2223using namespace std;
     
    2627   \brief standard constructor
    2728*/
    28 CDEngine::CDEngine () 
     29CDEngine::CDEngine ()
    2930{
    3031   this->setClassName("CDEngine");
    31    this->setClassID(CL_CD_ENGINE, "CDEngine"); 
     32   this->setClassID(CL_CD_ENGINE, "CDEngine");
    3233
    3334   /* testing purposes only: */
     
    4445
    4546*/
    46 CDEngine::~CDEngine () 
     47CDEngine::~CDEngine ()
    4748{
    4849  CDEngine::singletonRef = NULL;
     
    7475  this->rootTree->debug();
    7576  PRINT(0)("=  CDEngine: Spawning Tree: Finished\n");
    76   PRINT(0)("=======================================================\n");     
     77  PRINT(0)("=======================================================\n");
    7778
    7879}
     80
     81void CDEngine::debugSpawnTree(int depth, sVec3D* vertices, int numVertices)
     82{
     83  this->rootTree->spawnBVTree(depth, vertices, numVertices);
     84}
  • orxonox/trunk/src/lib/collision_detection/cd_engine.h

    r4551 r4615  
    1 /*! 
     1/*!
    22    \file cd_engine.h
    33    \brief Definition of the collision detection engine
    4    
     4
    55*/
    66
     
    1010#include "base_object.h"
    1111#include "collision_defs.h"
     12#include "abstract_model.h"
    1213
    1314template<class T> class tList;
     
    5051
    5152  void debug();
     53  void debugSpawnTree(int depth, sVec3D* vertices, int numVertices);
    5254
    5355 private:
  • orxonox/trunk/src/lib/collision_detection/obb_tree.cc

    r4612 r4615  
    107107    }
    108108
    109   this->spawnBVTree(1, vertList, length);
     109  this->spawnBVTree(2, vertList, length);
    110110
    111111  PRINT(0)("=  Spawning Tree: Finished\n");
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4614 r4615  
    389389void OBBTreeNode::drawBV(int currentDepth, const int depth) const
    390390{
    391   glBegin(GL_LINE_LOOP);
    392   glColor3f(1.0, 1.0, 1.0);
    393   for(int i = 0; i < this->bvElement->numOfVertices; ++i)
    394     {
    395       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
    396       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
    397     }
    398   glEnd();
     391//   glBegin(GL_LINE_LOOP);
     392//   glColor3f(1.0, 1.0, 1.0);
     393//   for(int i = 0; i < this->bvElement->numOfVertices; ++i)
     394//     {
     395//       glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]);
     396//       //printf("v(%f, %f, %f)\n", this->vertices[i][0], this->vertices[i][1], this->vertices[i][2]);
     397//     }
     398//   glEnd();
    399399}
    400400
Note: See TracChangeset for help on using the changeset viewer.