GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_octree.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  *****************************************************************************/
23 
24 #ifndef GLC_OCTREE_H_
25 #define GLC_OCTREE_H_
26 
27 #include "glc_spacepartitioning.h"
28 #include "../glc_config.h"
29 
30 class GLC_OctreeNode;
31 class GLC_Material;
32 class GLC_3DViewInstance;
33 
36 
37 
39 {
41 
43 
44 public:
47 
49  GLC_Octree(const GLC_Octree&);
50 
52  virtual ~GLC_Octree();
53 
55 
57 
59 
60 public:
62  static int defaultDepth();
63 
65  virtual QList<GLC_3DViewInstance*> listOfIntersectedInstances(const GLC_BoundingBox& bBox);
66 
68 
69 
71 
72 public:
73 
75  virtual void updateViewableInstances(const GLC_Frustum&);
76 
78  virtual void updateSpacePartitioning();
79 
81  virtual void clear();
82 
84 
85  void setDepth(int);
86 
88  void createBox(GLC_Material*, GLC_3DViewCollection* pCol= NULL);
89 
91  static void setDefaultDepth(int depth);
92 
94 
96 // Private services function
98 private:
99 
101 
102  void createBoxWithMaterial(GLC_3DViewCollection*, GLC_OctreeNode*, GLC_Material*);
103 
105 // Private members
107 private:
110 
113 
116 };
117 
118 #endif /* GLC_OCTREE_H_ */

©2005-2013 Laurent Ribon