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

Revision 1221, 1.3 KB checked in by mattausch, 18 years ago (diff)

added intel ray tracing

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
16        */
17class SamplingPreprocessor : public Preprocessor {
18public:
19               
20  SamplingPreprocessor();
21  ~SamplingPreprocessor();
22
23  virtual bool ComputeVisibility();
24
25
26protected:
27        /** Sets up ray for sampling.
28        */
29  void
30  SetupRay(Ray &ray,
31                   const Vector3 &point,
32                   const Vector3 &direction,
33                   const int type,
34                   const Ray::Intersection &source);
35 
36  /** Refined sampling for finding "holes", i.e., difficult visibility.
37   */
38  void
39  HoleSamplingPass();
40 
41 
42  Intersectable *
43  CastRay(
44                  const Vector3 &origin,
45                  const Vector3 &direction
46                  );
47 
48  /** Verify if the exact visibility for this object was established.
49   */
50  void
51  VerifyVisibility(Intersectable *object);
52 
53
54protected:
55
56
57        int mPass;
58        int mSamplesPerPass;
59        int mTotalSamples;
60       
61        ofstream mStats;
62        ObjectContainer mObjects;
63
64        RayContainer mSampleRays;
65        VssRayContainer mVssSampleRays;
66};
67
68}
69
70#endif
Note: See TracBrowser for help on using the repository browser.