Revision 406,
1.3 KB
checked in by mattausch, 19 years ago
(diff) |
started kd based bottom-up view cells
|
Line | |
---|
1 | #ifndef _RenderSimulator_h__
|
---|
2 | #define _RenderSimulator_h__
|
---|
3 |
|
---|
4 | #include "common.h"
|
---|
5 |
|
---|
6 | class BspTree;
|
---|
7 | class KdTree;
|
---|
8 | class ViewCell;
|
---|
9 |
|
---|
10 |
|
---|
11 | /** Simulated rendering using a simple render heuristics. Used to evaluate the |
---|
12 | quality of the view cell partition. |
---|
13 | */ |
---|
14 | class RenderSimulator |
---|
15 | { |
---|
16 | public: |
---|
17 | RenderSimulator(); |
---|
18 | RenderSimulator(float objRendercost, float vcOverhead); |
---|
19 | virtual Real SimulateRendering() = 0; |
---|
20 | |
---|
21 | protected: |
---|
22 | // render time for single object of the PVS |
---|
23 | float mObjRenderCost; |
---|
24 | // const overhead for crossing a view cell border |
---|
25 | float mVcOverhead; |
---|
26 | }; |
---|
27 | |
---|
28 | class BspTreeRenderSimulator: public RenderSimulator |
---|
29 | { |
---|
30 | public: |
---|
31 | BspTreeRenderSimulator(float objRenderCost, float vcOverhead, BspTree *bspTree); |
---|
32 | |
---|
33 | Real SimulateRendering(); |
---|
34 | |
---|
35 | protected: |
---|
36 | /** Simulates rendering of the pvs of one view cell, with given rendering time for an object. |
---|
37 | @param viewCell the view cell holding the Pvs |
---|
38 | @param objRenderTime estimated render time for one object of the Pvs |
---|
39 | */ |
---|
40 | Real RenderPvs(ViewCell &viewCell, const float objRenderTime) const; |
---|
41 | |
---|
42 | BspTree *mBspTree; |
---|
43 | }; |
---|
44 | |
---|
45 | class KdTreeRenderSimulator: public RenderSimulator |
---|
46 | { |
---|
47 | public: |
---|
48 | KdTreeRenderSimulator(float objRenderCost, float vcOverhead, KdTree *kdTree); |
---|
49 | |
---|
50 | Real SimulateRendering(); |
---|
51 | |
---|
52 | protected: |
---|
53 | KdTree *mKdTree; |
---|
54 | };
|
---|
55 |
|
---|
56 | #endif // RenderSimulator
|
---|
Note: See
TracBrowser
for help on using the repository browser.