Line | |
---|
1 | #ifndef _VssPreprocessor_H__
|
---|
2 | #define _VssPreprocessor_H__
|
---|
3 |
|
---|
4 | #include <fstream>
|
---|
5 | using namespace std;
|
---|
6 |
|
---|
7 | #include "Preprocessor.h"
|
---|
8 |
|
---|
9 |
|
---|
10 | /** Sampling based visibility preprocessing. The implementation is based on heuristical
|
---|
11 | sampling of view space */
|
---|
12 | class VssPreprocessor : public Preprocessor {
|
---|
13 | public:
|
---|
14 | int mPass;
|
---|
15 |
|
---|
16 | int mSamplesPerPass;
|
---|
17 | int mTotalSamples;
|
---|
18 | int mKdPvsDepth;
|
---|
19 | ofstream mStats;
|
---|
20 | ObjectContainer mObjects;
|
---|
21 | RayContainer mSampleRays;
|
---|
22 |
|
---|
23 | VssPreprocessor();
|
---|
24 |
|
---|
25 | ~VssPreprocessor();
|
---|
26 |
|
---|
27 | virtual bool ComputeVisibility();
|
---|
28 |
|
---|
29 | void
|
---|
30 | SetupRay(Ray &ray,
|
---|
31 | const Vector3 &point,
|
---|
32 | const Vector3 &direction
|
---|
33 | );
|
---|
34 |
|
---|
35 | KdNode *
|
---|
36 | GetNodeForPvs(KdLeaf *leaf);
|
---|
37 |
|
---|
38 | int
|
---|
39 | AddNodeSamples(const Ray &ray,
|
---|
40 | Intersectable *sObject,
|
---|
41 | Intersectable *tObject
|
---|
42 | );
|
---|
43 |
|
---|
44 | int
|
---|
45 | CastRay(Intersectable *object,
|
---|
46 | Ray &ray);
|
---|
47 |
|
---|
48 | KdNode *
|
---|
49 | GetNodeToSample(Intersectable *object);
|
---|
50 |
|
---|
51 | virtual bool BuildBspTree() { return false; }
|
---|
52 |
|
---|
53 | };
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.