source: GTP/trunk/Lib/Vis/Preprocessing/src/DifferenceSampling.h @ 2560

Revision 2560, 1.5 KB checked in by mattausch, 17 years ago (diff)

added functionality for visualization

RevLine 
[2546]1#ifndef _DifferenceSampling_H__
2#define _DifferenceSampling_H__
3
4#include "common.h"
[2548]5//#include "ObjectPvs.h"
[2546]6
[2548]7class SimpleRay;
8
[2546]9namespace GtpVisibilityPreprocessor {
10
11
12/** This sampling strategy utilizes the spatial filter to find
13        areas that are likely to be visible.
14
[2560]15        First the filter is applied. The difference set of objects
16        (filtered pvs - unfiltered pvs) gives you the objects which
17        are not found visible yet but have a good probability that they
18        are in fact visible, based on the current
19        state of the sampling and the size of the filter. In fact the
20        difference set is a probably visible set.
21
22        Algorithm overview:
23        We apply the filter for n times, each time with a higher filter radius.
24        The difference set gives you the probable visible set.
25        Then we use a certain #random samples for sampling the view cell border +
26        the object border. We can use different filter sizes to estimate the probability
27        distribution. The objects shouldreceived samples
[2546]28        roughly according to their probability of becoming invisible.
29*/     
30class DifferenceSampling: public SamplingStrategy
31{
32public:
33        DifferenceSampling(Preprocessor &preprocessor);
34        /** Compute the difference set between filtered and unfiltered pvs.
35        */
36        void ComputeDifferenceSet(ViewCell *vc, ObjectContainer &differenceSet);
37
38private:
39
[2548]40        virtual bool GenerateSample(SimpleRay &ray);
41
42        //ObjectPvs mDifferencePvs;
43        ObjectContainer mPvsDifference;
44
45        ViewCell *mCurrentViewCell;
46        int mNumSamples;
[2546]47};
48
49
50}
51
52#endif
53
Note: See TracBrowser for help on using the repository browser.