Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4542 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 7, 2005, 6:10:16 PM (19 years ago)
Author:
patrick
Message:

some more structural work and start of spawn tree function

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

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/bounding_volume.h

    r4541 r4542  
    2222  virtual ~BoundingVolume();
    2323
    24   virtual void createBV() = NULL;
    25 
    2624  inline const Vector* getCenter() const { return this->center; }
    2725
  • orxonox/trunk/src/lib/collision_detection/bv_tree_node.h

    r4541 r4542  
    1414class sVec3D;
    1515class BVTree;
     16template<class T> class tList;
    1617
    1718//! A class that represents a bounding volume tree
     
    2223  virtual ~BVTreeNode();
    2324
    24   virtual void spawnBVTree(int depth) = NULL;
     25  virtual void spawnBVTree(const int depth, tList<sVec3D> *verticesList) = NULL;
    2526
    2627  virtual BoundingVolume* getBV(int index) const = NULL;
  • orxonox/trunk/src/lib/collision_detection/obb.cc

    r4541 r4542  
    4141
    4242
    43 void OBB::createBV() const
    44 {}
    45 
    4643
    4744void OBB::mergeWith(const BoundingVolume &bv)
  • orxonox/trunk/src/lib/collision_detection/obb.h

    r4541 r4542  
    2020  virtual ~OBB();
    2121
    22   virtual void createBV() const;
    2322
    2423  inline const Vector* getAxis () const { return this->axis; }
  • orxonox/trunk/src/lib/collision_detection/obb_tree.cc

    r4541 r4542  
    4444void OBBTree::spawnBVTree(int depth)
    4545{
    46   float area[this->numberOfVertices];  //!< surface area of the i'th triangle of the convex hull
    47   float areaTotal; //!< surface area of the entire convex hull
    48   float centroid[this->numberOfVertices]; //!< centroid of the i'th convex hull
    49  
    50 
    51   //OBB obb();
    52   float muX, muY, muZ;
    53   for(int i = 0; i < this->numberOfVertices; ++i)
    54     {
    55      
    56     }
     46 
    5747}
    5848
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc

    r4541 r4542  
    1717
    1818#include "obb_tree_node.h"
     19#include "list.h"
     20#include "obb.h"
    1921
    2022using namespace std;
     
    4143
    4244
     45
     46/**
     47   \brief creates a new BVTree or BVTree partition
     48   \param depth: the depth of the tree
     49   \param verticesList: the list of vertices of the object - each vertices triple is interpreted as a triangle
     50*/
     51void OBBTreeNode::spawnBVTree(const int depth, tList<sVec3D> *verticesList)
     52{
     53  float     area[verticesList->getSize()];           //!< surface area of the i'th triangle of the convex hull
     54  float     areaTotal;                               //!< surface area of the entire convex hull
     55  float     centroid[verticesList->getSize()];       //!< centroid of the i'th convex hull 
     56  OBB*      obb = new OBB();                         //!< the new obb to add
     57
     58  /* fist compute all the convex hull particles */
     59  for(int i = 0; i < verticesList->getSize(); ++i)
     60    {
     61     
     62    }
     63}
     64
     65
     66void OBBTreeNode::collideWith(const BVTree &tree)
     67{}
     68
     69
     70void OBBTreeNode::drawBV(int currentDepth, const int depth) const
     71{}
     72
     73
     74void OBBTreeNode::drawBVPolygon(int currentDepth, const int depth) const
     75{}
     76
     77
     78void OBBTreeNode::drawBVBlended(int currentDepth, const int depth) const
     79{}
  • orxonox/trunk/src/lib/collision_detection/obb_tree_node.h

    r4541 r4542  
    2222  virtual ~OBBTreeNode();
    2323
    24   virtual void spawnBVTree(int depth);
     24  virtual void spawnBVTree(const int depth, tList<sVec3D> *verticesList);
    2525
    2626  BoundingVolume* getBV(int index) const { return this->bvElement; }
Note: See TracChangeset for help on using the changeset viewer.