Revision 411,
1.5 KB
checked in by mattausch, 19 years ago
(diff) |
worked on view space partition kd tree
|
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 | class KdLeaf;
|
---|
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, float moveSpeed); |
---|
19 | virtual Real SimulateRendering() = 0; |
---|
20 | |
---|
21 | /// render time for single object of the PVS |
---|
22 | float mObjRenderCost; |
---|
23 | /// const overhead for crossing a view cell border |
---|
24 | float mVcOverhead; |
---|
25 | /// move speed of player |
---|
26 | float mMoveSpeed; |
---|
27 | }; |
---|
28 | |
---|
29 | class BspViewCellRenderSimulator: public RenderSimulator |
---|
30 | { |
---|
31 | public: |
---|
32 | BspViewCellRenderSimulator(float objRenderCost, |
---|
33 | float vcOverhead, |
---|
34 | float moveSpeed, |
---|
35 | BspTree *bspTree); |
---|
36 | |
---|
37 | Real SimulateRendering(); |
---|
38 | |
---|
39 | protected: |
---|
40 | /** Simulates rendering of the pvs of one view cell, with given rendering time for an object. |
---|
41 | @param viewCell the view cell holding the Pvs |
---|
42 | @param objRenderTime estimated render time for one object of the Pvs |
---|
43 | */ |
---|
44 | Real RenderPvs(ViewCell &viewCell, const float objRenderTime) const; |
---|
45 | |
---|
46 | BspTree *mBspTree; |
---|
47 | }; |
---|
48 | |
---|
49 | class KdViewCellRenderSimulator: public RenderSimulator |
---|
50 | { |
---|
51 | public: |
---|
52 | KdViewCellRenderSimulator(float objRenderCost, |
---|
53 | float vcOverhead, |
---|
54 | float moveSpeed, |
---|
55 | KdTree *kdTree); |
---|
56 | Real SimulateRendering();
|
---|
57 | |
---|
58 | protected: |
---|
59 | |
---|
60 | Real RenderPvs(KdLeaf *leaf, float objRenderTime) const; |
---|
61 | |
---|
62 | KdTree *mKdTree; |
---|
63 | };
|
---|
64 |
|
---|
65 | #endif // RenderSimulator
|
---|
Note: See
TracBrowser
for help on using the repository browser.