source: trunk/VUT/GtpVisibilityPreprocessor/src/RenderSimulator.h @ 409

Revision 409, 1.4 KB checked in by mattausch, 19 years ago (diff)

worked on kd view space partitioning structure
worked on render simulation

Line 
1#ifndef _RenderSimulator_h__
2#define _RenderSimulator_h__
3
4#include "common.h"
5
6class BspTree;
7class KdTree;
8class ViewCell;
9class KdLeaf;
10
11/** Simulated rendering using a simple render heuristics. Used to evaluate the
12        quality of the view cell partition.
13*/
14class RenderSimulator
15{
16public:
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
29class BspViewCellRenderSimulator: public RenderSimulator
30{
31public:
32        BspViewCellRenderSimulator(float objRenderCost, float vcOverhead, float moveSpeed, BspTree *bspTree);
33
34        Real SimulateRendering();
35
36protected:
37        /** Simulates rendering of the pvs of one view cell, with given rendering time for an object.
38                @param viewCell the view cell holding the Pvs
39                @param objRenderTime estimated render time for one object of the Pvs
40        */
41        Real RenderPvs(ViewCell &viewCell, const float objRenderTime) const;
42
43        BspTree *mBspTree;
44};
45
46class KdViewCellRenderSimulator: public RenderSimulator
47{
48public:
49        KdViewCellRenderSimulator(float objRenderCost, float vcOverhead, float moveSpeed, KdTree *kdTree);
50        Real SimulateRendering();
51
52protected:
53
54        Real RenderPvs(KdLeaf *leaf, float objRenderTime) const;
55
56        KdTree *mKdTree;
57};
58
59#endif // RenderSimulator
Note: See TracBrowser for help on using the repository browser.