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