Rev | Line | |
---|
[372] | 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 |
|
---|
[860] | 10 | namespace GtpVisibilityPreprocessor {
|
---|
[372] | 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;
|
---|
[492] | 19 | void UpdateBox();
|
---|
[372] | 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
|
---|
[492] | 31 | CollectObjects(ObjectContainer *instances);
|
---|
| 32 |
|
---|
[387] | 33 | int
|
---|
[492] | 34 | AssignObjectIds();
|
---|
| 35 |
|
---|
| 36 | void
|
---|
| 37 | GetStatistics(int &intersectables, int &faces) const;
|
---|
[372] | 38 |
|
---|
[492] | 39 | AxisAlignedBox3 GetBox() const { return mRoot->mBox; }
|
---|
| 40 |
|
---|
[372] | 41 | protected:
|
---|
| 42 | };
|
---|
| 43 |
|
---|
| 44 |
|
---|
[860] | 45 | }
|
---|
[372] | 46 |
|
---|
| 47 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.