Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h @ 4819

Last change on this file since 4819 was 4819, checked in by patrick, 19 years ago

orxonox/trunk: some more function definitions

File size: 1.6 KB
Line 
1/*!
2    \file spatial_separation.h
3    \brief Definition of the generic spatial separation process of model data
4
5 */
6
7#ifndef _SPATIAL_SEPARATION_H
8#define _SPATIAL_SEPARATION_H
9
10#include "base_object.h"
11
12
13class AbstractModel;
14class Quadtree;
15
16
17#define SEC_OFFSET 1.0                       //!< the offset added to the overlapSize to ensure that there are no problems in cd
18
19//! A class for spatial separation of vertices based arrays
20class SpatialSeparation : public BaseObject {
21
22  public:
23    SpatialSeparation(AbstractModel* model, float overlapSize);
24    SpatialSeparation(AbstractModel* model, AbstractModel* playerModel);
25    virtual ~SpatialSeparation();
26
27    void setTreeDepth(int depth) { this->treeDepth = depth; }
28    void setMinLength(int minLength) { this->minLength = minLength; }
29
30    Quadtree* createQuadtree(AbstractModel* model, float minLength);
31    Quadtree* createQuadtree(AbstractModel* model, int treeDepth);
32    Quadtree* createQuadtree(AbstractModel* model);
33
34
35  private:
36    void separateZone();
37    float getMaxDimension(AbstractModel* playerModel);
38
39
40  private:
41    AbstractModel*             model;        //!< the reference to the model that has to be handled
42    Quadtree*                  quadtree;     //!< the reference to the created quadtree
43
44    AbstractModel*             playerModel;  //!< referece to the player model, if needed for overlap calculations
45    float                      overlapSize;  //!< the size of overlaping
46
47    int                        treeDepth;    //!< depth of the quadtree
48    float                      minLength;    //!< min length of a quadtree node
49};
50
51#endif /* _SPATIAL_SEPARATION_H */
Note: See TracBrowser for help on using the repository browser.