Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 7, 2005, 11:10:04 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: some more function definitions

Location:
orxonox/trunk/src/lib/graphics/spatial_separation
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc

    r4812 r4819  
    2525   \todo this constructor is not jet implemented - do it
    2626*/
    27 Quadtree::Quadtree ()
     27Quadtree::Quadtree (modelInfo* pModelInfo)
    2828{
    2929   this->setClassID(CL_QUADTREE, "Quadtree");
     30   this->pModelInfo = pModelInfo;
    3031}
    3132
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.h

    r4812 r4819  
    1818
    1919 public:
    20   Quadtree();
     20  Quadtree(modelInfo* pModelInfo);
    2121  virtual ~Quadtree();
    2222
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4813 r4819  
    3636QuadtreeNode::~QuadtreeNode ()
    3737{
    38   // delete what has to be deleted here
    3938}
     39
    4040
    4141
    4242/**
    4343   \brief gives the signal to separate the model into a quadtree
     44   \param treeDepth the max depth, the steps to go if treeDept == 0 leaf reached
    4445 */
    45 void QuadtreeNode::separateNode()
     46void QuadtreeNode::separateNode(int treeDepth)
     47{}
     48
     49
     50/**
     51   \brief gives the signal to separate the model into a quadtree
     52   \param treeDepth the max depth, the steps to go if treeDept == 0 leaf reached
     53*/
     54void QuadtreeNode::separateNode(float minLength)
    4655{}
    4756
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h

    r4813 r4819  
    2222  virtual ~QuadtreeNode();
    2323
    24   void separateNode();
     24  void separateNode(int treeDepth);
     25  void separateNode(float minLength);
    2526
    2627  void drawTree(int depth, int drawMode) const;
  • orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc

    r4810 r4819  
    1818#include "spatial_separation.h"
    1919#include "abstract_model.h"
     20#include "quadtree.h"
    2021
    2122using namespace std;
     
    5758SpatialSeparation::~SpatialSeparation ()
    5859{
    59   // delete what has to be deleted here
    6060}
     61
     62
     63/**
     64  \brief creates a quadtree
     65  \param model the model to do a quadtree on
     66  \param minLength the minimal length of a quadtree node
     67  \return the new quadtree
     68 */
     69Quadtree* SpatialSeparation::createQuadtree(AbstractModel* model, float minLength)
     70{
     71  this->minLength = minLength;
     72
     73}
     74
     75
     76/**
     77  \brief creates a quadtree
     78  \param model the model to do a quadtree on
     79  \param minLength the minimal length of a quadtree node
     80  \return the new quadtree
     81 */
     82Quadtree* SpatialSeparation::createQuadtree(AbstractModel* model, int treeDepth)
     83{
     84  this->treeDepth = treeDepth;
     85}
     86
     87
     88/**
     89  \brief creates a quadtree
     90  \param model the model to do a quadtree on
     91  \param minLength the minimal length of a quadtree node
     92  \return the new quadtree
     93*/
     94Quadtree* SpatialSeparation::createQuadtree(AbstractModel* model)
     95{
     96  this->quadtree = new Quadtree(model->getModelInfo());
     97  this->quadtree->separate();
     98
     99  return this->quadtree;
     100}
     101
     102
     103/**
     104  \brief gets the maximal dimension of a model
     105  \param playerModel the model that this measurement is based on
     106  \return the maximal dimension of the model
     107 */
     108float SpatialSeparation::getMaxDimension(AbstractModel* playerModel)
     109{
     110
     111}
     112
     113
     114
  • orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h

    r4810 r4819  
    1414class Quadtree;
    1515
     16
     17#define SEC_OFFSET 1.0                       //!< the offset added to the overlapSize to ensure that there are no problems in cd
    1618
    1719//! A class for spatial separation of vertices based arrays
     
    3335  private:
    3436    void separateZone();
     37    float getMaxDimension(AbstractModel* playerModel);
    3538
    3639
Note: See TracChangeset for help on using the changeset viewer.