Changeset 4810 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jul 7, 2005, 2:15:18 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/spatial_separation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.h
r4805 r4810 10 10 11 11 #include "base_object.h" 12 #include "vector.h" 13 14 class QuadtreeNode; 12 15 13 16 //! A class for quadtree separation of the world … … 20 23 21 24 private: 25 QuadtreeNode* rootNode; 26 22 27 23 28 }; -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h
r4805 r4810 9 9 10 10 #include "base_object.h" 11 11 #include "vector.h" 12 12 // FORWARD DEFINITION 13 13 14 14 class QuadtreeNode; 15 15 16 16 //! A class for a Quadtree Node representation … … 23 23 24 24 private: 25 Vector center; //!< center coordinate of the quadtree node - relative coordinates in model space(!) 26 float axisLength; //!< axis length of the quadtree 27 float maxHeigth; //!< max height of the model in the quadtree 25 28 29 QuadtreeNode* nodeA; //!< reference to the node A 30 QuadtreeNode* nodeB; //!< reference to the node B 31 QuadtreeNode* nodeC; //!< reference to the node C 32 QuadtreeNode* nodeD; //!< reference to the node D 26 33 }; 27 34 -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4809 r4810 24 24 /** 25 25 \brief standard constructor 26 \todo this constructor is not jet implemented - do it 26 \param model the model that is to be separated 27 \param overlapSize each box will overlap for a given size 28 29 The boxes are overlaping because this makes collision detection a lot simpler 30 27 31 */ 28 SpatialSeparation::SpatialSeparation ( )32 SpatialSeparation::SpatialSeparation (AbstractModel* model, float overlapSize) 29 33 { 30 34 this->setClassID(CL_SPATIAL_SEPARATION, "SpatialSeparation"); 35 36 } 37 38 /** 39 \brief standard constructor 40 \param model the model that is to be separated 41 \param overlapSize each box will overlap for a given size 42 43 The boxes are overlaping because this makes collision detection a lot simpler 44 45 */ 46 SpatialSeparation::SpatialSeparation (AbstractModel* model, AbstractModel* playerModel) 47 { 48 this->setClassID(CL_SPATIAL_SEPARATION, "SpatialSeparation"); 31 49 32 50 } -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h
r4809 r4810 1 1 /*! 2 2 \file spatial_separation.h 3 \brief Definition of the generic spatial separation of model data3 \brief Definition of the generic spatial separation process of model data 4 4 5 5 */ … … 19 19 20 20 public: 21 SpatialSeparation(); 21 SpatialSeparation(AbstractModel* model, float overlapSize); 22 SpatialSeparation(AbstractModel* model, AbstractModel* playerModel); 22 23 virtual ~SpatialSeparation(); 23 24 25 void setTreeDepth(int depth) { this->treeDepth = depth; } 26 void setMinLength(int minLength) { this->minLength = minLength; } 27 28 Quadtree* createQuadtree(AbstractModel* model, float minLength); 29 Quadtree* createQuadtree(AbstractModel* model, int treeDepth); 24 30 Quadtree* createQuadtree(AbstractModel* model); 25 31 26 32 27 33 private: 28 AbstractModel* model;34 void separateZone(); 29 35 30 36 37 private: 38 AbstractModel* model; //!< the reference to the model that has to be handled 39 Quadtree* quadtree; //!< the reference to the created quadtree 40 41 AbstractModel* playerModel; //!< referece to the player model, if needed for overlap calculations 42 float overlapSize; //!< the size of overlaping 43 44 int treeDepth; //!< depth of the quadtree 45 float minLength; //!< min length of a quadtree node 31 46 }; 32 47
Note: See TracChangeset
for help on using the changeset viewer.