Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6016 was 5356, checked in by bensch, 19 years ago

orxonox/trunk: saver Weapon-Projectile-generation and Stuff

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