Line | |
---|
1 | #ifndef _SceneGraph_H__
|
---|
2 | #define _SceneGraph_H__
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | using namespace std;
|
---|
6 |
|
---|
7 | #include "Containers.h"
|
---|
8 | #include "AxisAlignedBox3.h"
|
---|
9 |
|
---|
10 | namespace GtpVisibilityPreprocessor {
|
---|
11 |
|
---|
12 | /** Basic scene graph node, we are interested only in bounding boxes and topology
|
---|
13 | of the scene graph */
|
---|
14 | class SceneGraphNode {
|
---|
15 | public:
|
---|
16 | ObjectContainer mGeometry;
|
---|
17 | SceneGraphNodeContainer mChildren;
|
---|
18 | AxisAlignedBox3 mBox;
|
---|
19 | void UpdateBox();
|
---|
20 | };
|
---|
21 |
|
---|
22 |
|
---|
23 | /** Scene graph class */
|
---|
24 | class SceneGraph {
|
---|
25 |
|
---|
26 | public:
|
---|
27 | SceneGraphNode *mRoot;
|
---|
28 | bool Export(const string filename);
|
---|
29 |
|
---|
30 | int
|
---|
31 | CollectObjects(ObjectContainer *instances);
|
---|
32 |
|
---|
33 | int
|
---|
34 | AssignObjectIds();
|
---|
35 |
|
---|
36 | void
|
---|
37 | GetStatistics(int &intersectables, int &faces) const;
|
---|
38 |
|
---|
39 | AxisAlignedBox3 GetBox() const { return mRoot->mBox; }
|
---|
40 |
|
---|
41 | protected:
|
---|
42 | };
|
---|
43 |
|
---|
44 |
|
---|
45 | }
|
---|
46 |
|
---|
47 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.