source: GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.h @ 1021

Revision 1021, 2.2 KB checked in by mattausch, 18 years ago (diff)

added view cells manager for vsposptree

Line 
1#ifndef _SamplingStategy_H__
2#define _SamplingStategy_H__
3
4
5namespace GtpVisibilityPreprocessor {
6
7
8class Preprocessor;
9struct SimpleRay;
10
11/** This class generates a specific sampling strategy.
12*/
13class SamplingStrategy
14{
15 public:
16
17         /** Default constructor
18     */
19         SamplingStrategy(const Preprocessor &preprocessor): mPreprocessor(preprocessor)
20         {}
21
22         virtual ~SamplingStrategy() {};
23
24         /** Each strategy has to implement this function.
25                 @returns true if generated valid sample.
26         */
27         virtual bool GenerateSample(SimpleRay &ray) const = 0;
28
29protected:
30
31        const Preprocessor &mPreprocessor;
32
33};
34
35
36class ObjectBasedDistribution: public SamplingStrategy
37{
38 public:
39       
40         ObjectBasedDistribution(const Preprocessor &preprocessor):
41         SamplingStrategy(preprocessor) {}
42
43         virtual bool GenerateSample(SimpleRay &ray) const;
44};
45
46
47class ObjectDirectionBasedDistribution: public SamplingStrategy
48{
49 public:
50         ObjectDirectionBasedDistribution(const Preprocessor &preprocessor):
51         SamplingStrategy(preprocessor) {}
52        virtual bool GenerateSample(SimpleRay &ray) const;
53};
54
55
56class DirectionBasedDistribution: public SamplingStrategy
57{
58 public:
59        DirectionBasedDistribution(const Preprocessor &preprocessor):
60         SamplingStrategy(preprocessor) {}
61        virtual bool GenerateSample(SimpleRay &ray) const;
62};
63
64
65class DirectionBoxBasedDistribution: public SamplingStrategy
66{
67 public:
68         DirectionBoxBasedDistribution(const Preprocessor &preprocessor):
69           SamplingStrategy(preprocessor) {}
70           
71           virtual bool GenerateSample(SimpleRay &ray) const;
72};
73
74
75class SpatialBoxBasedDistribution: public SamplingStrategy
76{
77 public:
78         SpatialBoxBasedDistribution(const Preprocessor &preprocessor):
79         SamplingStrategy(preprocessor) {}
80         
81         virtual bool GenerateSample(SimpleRay &ray) const;
82};
83
84
85/** This strategy generates samples inside of the objects, e.g.,
86        for sampling the inside of a colon.
87*/
88/*class ObjectsInteriorDistribution: public SamplingStrategy
89{
90 public:
91         ObjectsInteriorDistribution(const Preprocessor &preprocessor):
92         SamplingStrategy(preprocessor) {}
93         
94         virtual bool GenerateSample(SimpleRay &ray) const;
95};
96*/
97};
98
99#endif
Note: See TracBrowser for help on using the repository browser.