Revision 2757,
740 bytes
checked in by mattausch, 17 years ago
(diff) |
loading textured scenes possible
|
Line | |
---|
1 | #include "FrustumCullingTraverser.h"
|
---|
2 |
|
---|
3 | namespace CHCDemo
|
---|
4 | {
|
---|
5 |
|
---|
6 | FrustumCullingTraverser::FrustumCullingTraverser(): RenderTraverser()
|
---|
7 | {
|
---|
8 | }
|
---|
9 |
|
---|
10 |
|
---|
11 | void FrustumCullingTraverser::Render()
|
---|
12 | {
|
---|
13 | while (!mDistanceQueue.empty())
|
---|
14 | {
|
---|
15 | BvhNode *node = mDistanceQueue.top();
|
---|
16 | mDistanceQueue.pop();
|
---|
17 |
|
---|
18 | // interesting for the visualization, so rest and set
|
---|
19 | node->SetVisible(false);
|
---|
20 | //mNumTraversedNodes ++;
|
---|
21 |
|
---|
22 | //bool intersects;
|
---|
23 |
|
---|
24 | if (1)//mBvh->InsideViewFrustum(node, intersects))
|
---|
25 | {
|
---|
26 | // update node's visited flag => needed for rendering
|
---|
27 | // so set it also here
|
---|
28 | //node->SetLastVisited(mFrameID);
|
---|
29 | //node->SetVisible(true);
|
---|
30 |
|
---|
31 | TraverseNode(node);
|
---|
32 | }
|
---|
33 | else
|
---|
34 | {
|
---|
35 | //mNumFrustumCulledNodes ++;
|
---|
36 | }
|
---|
37 | }
|
---|
38 | }
|
---|
39 |
|
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.