Revision 335,
1.2 KB
checked in by mattausch, 19 years ago
(diff) |
reprogrammed splitplane evaluation. updated default.env
|
Line | |
---|
1 | #ifndef _SamplingPreprocessor_H__ |
---|
2 | #define _SamplingPreprocessor_H__ |
---|
3 | |
---|
4 | #include <fstream> |
---|
5 | using namespace std; |
---|
6 | |
---|
7 | #include "Preprocessor.h" |
---|
8 | |
---|
9 | struct SimpleRay { |
---|
10 | Vector3 mOrigin; |
---|
11 | Vector3 mDirection; |
---|
12 | }; |
---|
13 | |
---|
14 | /** Sampling based visibility preprocessing. The implementation is based on heuristical |
---|
15 | sampling of view space */ |
---|
16 | class SamplingPreprocessor : public Preprocessor { |
---|
17 | public: |
---|
18 | int mPass; |
---|
19 | |
---|
20 | int mSamplesPerPass; |
---|
21 | int mTotalSamples; |
---|
22 | int mKdPvsDepth; |
---|
23 | ofstream mStats; |
---|
24 | ObjectContainer mObjects; |
---|
25 | RayContainer mSampleRays; |
---|
26 | int mBspConstructionSamples; |
---|
27 | |
---|
28 | |
---|
29 | SamplingPreprocessor(); |
---|
30 | |
---|
31 | ~SamplingPreprocessor(); |
---|
32 | |
---|
33 | virtual bool ComputeVisibility(); |
---|
34 | |
---|
35 | void |
---|
36 | SetupRay(Ray &ray, |
---|
37 | const Vector3 &point, |
---|
38 | const Vector3 &direction, |
---|
39 | const int type); |
---|
40 | |
---|
41 | KdNode * |
---|
42 | GetNodeForPvs(KdLeaf *leaf); |
---|
43 | |
---|
44 | int |
---|
45 | AddNodeSamples(Intersectable *object, const Ray &ray); |
---|
46 | |
---|
47 | void |
---|
48 | HoleSamplingPass(); |
---|
49 | |
---|
50 | int |
---|
51 | CastRay(Intersectable *object, Ray &ray); |
---|
52 | |
---|
53 | int |
---|
54 | CastEdgeSamples( |
---|
55 | Intersectable *object, |
---|
56 | const Vector3 &point, |
---|
57 | MeshInstance *mi, |
---|
58 | const int samples |
---|
59 | ); |
---|
60 | |
---|
61 | /** Adds objects samples to view cells. |
---|
62 | */ |
---|
63 | int AddObjectSamples(Intersectable *obj, const Ray &ray); |
---|
64 | |
---|
65 | bool BuildBspTree(); |
---|
66 | }; |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.