source: trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.h @ 335

Revision 335, 1.2 KB checked in by mattausch, 19 years ago (diff)

reprogrammed splitplane evaluation. updated default.env

RevLine 
[162]1#ifndef _SamplingPreprocessor_H__
2#define _SamplingPreprocessor_H__
3
[245]4#include <fstream>
5using namespace std;
6
[162]7#include "Preprocessor.h"
8
[245]9struct SimpleRay {
10  Vector3 mOrigin;
11  Vector3 mDirection;
12};
[162]13
14/** Sampling based visibility preprocessing. The implementation is based on heuristical
15    sampling of view space */
16class SamplingPreprocessor : public Preprocessor {
17public:
[256]18        int mPass;
19
[176]20  int mSamplesPerPass;
21  int mTotalSamples;
22  int mKdPvsDepth;
[245]23  ofstream mStats;
24  ObjectContainer mObjects;
[331]25  RayContainer mSampleRays;
[329]26  int mBspConstructionSamples;
[245]27
[333]28       
[176]29  SamplingPreprocessor();
30
[329]31  ~SamplingPreprocessor();
32
[162]33  virtual bool ComputeVisibility();
[176]34
35  void
[335]36  SetupRay(Ray &ray,
37                   const Vector3 &point,
38                   const Vector3 &direction,
39                   const int type);
[176]40
41  KdNode *
42  GetNodeForPvs(KdLeaf *leaf);
43
44  int
[256]45  AddNodeSamples(Intersectable *object, const Ray &ray);
[176]46
[191]47  void
48  HoleSamplingPass();
49
[256]50        int
51        CastRay(Intersectable *object, Ray &ray);
52
[333]53        int
[256]54        CastEdgeSamples(
55                                                                        Intersectable *object,
56                                                                        const Vector3 &point,
[333]57                                                                        MeshInstance *mi,
[256]58                                                                        const int samples
59                                                                        );
60
[308]61        /** Adds objects samples to view cells.
62        */
63        int AddObjectSamples(Intersectable *obj, const Ray &ray);
[329]64
65        bool BuildBspTree();
[162]66};
67
68
69
70#endif
Note: See TracBrowser for help on using the repository browser.