Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9869 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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
[6022]11class Model;
[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 {
[9869]21  ObjectListDeclaration(SpatialSeparation);
[4790]22
[4809]23  public:
[6022]24    SpatialSeparation(Model* model, float overlapSize);
25    SpatialSeparation(Model* model, Model* playerModel);
[4809]26    virtual ~SpatialSeparation();
[4790]27
[4810]28    void setTreeDepth(int depth) { this->treeDepth = depth; }
29    void setMinLength(int minLength) { this->minLength = minLength; }
30
[6022]31    Quadtree* createQuadtree(Model* model, float minLength);
32    Quadtree* createQuadtree(Model* model, int treeDepth);
33    Quadtree* createQuadtree(Model* model);
[4790]34
[4919]35    inline Quadtree* getQuadtree() { return this->quadtree; }
[4805]36
[4889]37    void drawQuadtree();
38
[4809]39  private:
[4810]40    void separateZone();
[4805]41
[4790]42
[4810]43  private:
[6022]44    Model*             model;        //!< the reference to the model that has to be handled
[4810]45    Quadtree*                  quadtree;     //!< the reference to the created quadtree
46
[6022]47    Model*             playerModel;  //!< referece to the player model, if needed for overlap calculations
[4810]48    float                      overlapSize;  //!< the size of overlaping
49
50    int                        treeDepth;    //!< depth of the quadtree
51    float                      minLength;    //!< min length of a quadtree node
[4790]52};
53
54#endif /* _SPATIAL_SEPARATION_H */
Note: See TracBrowser for help on using the repository browser.