source: GTP/trunk/Lib/Vis/Preprocessing/src/SamplingPreprocessor.h @ 1199

Revision 1199, 1.2 KB checked in by bittner, 18 years ago (diff)

code merge

Line 
1#ifndef _SamplingPreprocessor_H__
2#define _SamplingPreprocessor_H__
3
4#include <fstream>
5using namespace std;
6
7#include "Preprocessor.h"
8#include "VssRay.h"
9
10namespace GtpVisibilityPreprocessor {
11
12class Exporter;
13
14/** Sampling based visibility preprocessing. The implementation is based on heuristical
15    sampling of view space */
16class SamplingPreprocessor : public Preprocessor {
17public:
18               
19  SamplingPreprocessor();
20  ~SamplingPreprocessor();
21
22  virtual bool ComputeVisibility();
23
24
25protected:
26        /** Sets up ray for sampling.
27        */
28  void
29  SetupRay(Ray &ray,
30                   const Vector3 &point,
31                   const Vector3 &direction,
32                   const int type,
33                   const Ray::Intersection &source);
34 
35  /** Refined sampling for finding "holes", i.e., difficult visibility.
36   */
37  void
38  HoleSamplingPass();
39 
40 
41  Intersectable *
42  CastRay(
43                  const Vector3 &origin,
44                  const Vector3 &direction
45                  );
46 
47  /** Verify if the exact visibility for this object was established.
48   */
49  void
50  VerifyVisibility(Intersectable *object);
51 
52
53protected:
54
55
56        int mPass;
57        int mSamplesPerPass;
58        int mTotalSamples;
59       
60        ofstream mStats;
61        ObjectContainer mObjects;
62
63        RayContainer mSampleRays;
64        VssRayContainer mVssSampleRays;
65};
66
67}
68
69#endif
Note: See TracBrowser for help on using the repository browser.