Revision 1958,
1.1 KB
checked in by mattausch, 18 years ago
(diff) |
debug version of global lines renderer
|
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 | */
|
---|
15 | class SceneGraphNode {
|
---|
16 | public:
|
---|
17 | ObjectContainer mGeometry;
|
---|
18 | SceneGraphNodeContainer mChildren;
|
---|
19 | AxisAlignedBox3 mBox;
|
---|
20 | ~SceneGraphNode();
|
---|
21 | void UpdateBox();
|
---|
22 | };
|
---|
23 |
|
---|
24 |
|
---|
25 | /** Scene graph class */
|
---|
26 | class SceneGraph {
|
---|
27 |
|
---|
28 | public:
|
---|
29 |
|
---|
30 | SceneGraph();
|
---|
31 | ~SceneGraph();
|
---|
32 |
|
---|
33 | bool Export(const string filename);
|
---|
34 |
|
---|
35 | int CollectObjects(ObjectContainer *instances);
|
---|
36 |
|
---|
37 | int AssignObjectIds();
|
---|
38 |
|
---|
39 | void GetStatistics(int &intersectables, int &faces) const;
|
---|
40 |
|
---|
41 | AxisAlignedBox3 GetBox() const { return mRoot->mBox; }
|
---|
42 |
|
---|
43 | /** Exports binary version of the scene.
|
---|
44 | */
|
---|
45 | void ExportScene(const string filename);
|
---|
46 |
|
---|
47 | /** Loads binary version of the scene.
|
---|
48 | */
|
---|
49 | void LoadScene(const string filename);
|
---|
50 |
|
---|
51 | SceneGraphNode *GetRoot();
|
---|
52 |
|
---|
53 | void SetRoot(SceneGraphNode *sgNnode);
|
---|
54 |
|
---|
55 |
|
---|
56 | protected:
|
---|
57 |
|
---|
58 | SceneGraphNode *mRoot;
|
---|
59 | };
|
---|
60 |
|
---|
61 |
|
---|
62 | }
|
---|
63 |
|
---|
64 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.