Revision 492,
797 bytes
checked in by bittner, 19 years ago
(diff) |
Large merge - viewcells seem not functional now
|
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 |
|
---|
| 10 |
|
---|
| 11 | /** Basic scene graph node, we are interested only in bounding boxes and topology
|
---|
| 12 | of the scene graph */
|
---|
| 13 | class SceneGraphNode {
|
---|
| 14 | public:
|
---|
| 15 | ObjectContainer mGeometry;
|
---|
| 16 | SceneGraphNodeContainer mChildren;
|
---|
| 17 | AxisAlignedBox3 mBox;
|
---|
[492] | 18 | void UpdateBox();
|
---|
[372] | 19 | };
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | /** Scene graph class */
|
---|
| 23 | class SceneGraph {
|
---|
| 24 |
|
---|
| 25 | public:
|
---|
| 26 | SceneGraphNode *mRoot;
|
---|
| 27 | bool Export(const string filename);
|
---|
| 28 |
|
---|
| 29 | int
|
---|
[492] | 30 | CollectObjects(ObjectContainer *instances);
|
---|
| 31 |
|
---|
[387] | 32 | int
|
---|
[492] | 33 | AssignObjectIds();
|
---|
| 34 |
|
---|
| 35 | void
|
---|
| 36 | GetStatistics(int &intersectables, int &faces) const;
|
---|
[372] | 37 |
|
---|
[492] | 38 | AxisAlignedBox3 GetBox() const { return mRoot->mBox; }
|
---|
| 39 |
|
---|
[372] | 40 | protected:
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.