source: trunk/VUT/GtpVisibilityPreprocessor/src/VssPreprocessor.h @ 427

Revision 427, 1.6 KB checked in by bittner, 19 years ago (diff)

vss updates

Line 
1#ifndef _VssPreprocessor_H__
2#define _VssPreprocessor_H__
3
4#include <fstream>
5using namespace std;
6
7#include "Preprocessor.h"
8#include "VssRay.h"
9class VssTree;
10class VssTreeLeaf;
11
12/** Sampling based visibility preprocessing. The implementation is based on heuristical
13    sampling of view space */
14class VssPreprocessor : public Preprocessor {
15public:
16        int mPass;
17  int mSamplesPerPass;
18  int mVssSamplesPerPass;
19  int mInitialSamples;
20  int mVssSamples;
21        bool mUseImportanceSampling;
22
23        AxisAlignedBox3 *mViewSpaceBox;
24
25        ofstream mStats;
26       
27  ObjectContainer mObjects;
28
29        // rays cast during the processing
30  VssRayContainer mVssRays;
31       
32  VssPreprocessor();
33  ~VssPreprocessor();
34
35  virtual bool ComputeVisibility();
36
37        Vector3
38        GetViewpoint(AxisAlignedBox3 *viewSpaceBox);
39
40        Vector3
41        GetDirection(const Vector3 &viewpoint,
42                                                         AxisAlignedBox3 *viewSpaceBox
43                                                         );
44       
45  void
46  SetupRay(Ray &ray,
47                                         const Vector3 &point,
48                                         const Vector3 &direction
49                                         );
50
51
52       
53        int
54        CastRay(
55                                        Vector3 &viewPoint,
56                                        Vector3 &direction,
57                                        VssRayContainer &vssRays
58
59                                        );
60               
61
62       
63        virtual bool BuildBspTree() { return false; }
64
65
66        bool
67        ExportRays(const char *filename,
68                                                 const VssRayContainer &vssRays,
69                                                 const int number
70                                                 );
71
72        int
73        GenerateImportanceRays(VssTree *vssTree,
74                                                                                                 const int desiredSamples,
75                                                                                                 SimpleRayContainer &rays
76                                                                                                 );
77
78
79        bool
80        ExportVssTreeLeaf(char *filename,
81                                                                                VssTree *tree,
82                                                                                VssTreeLeaf *leaf);
83
84        void
85        ExportVssTreeLeaves(VssTree *tree, const int number);
86       
87       
88};
89
90
91
92#endif
Note: See TracBrowser for help on using the repository browser.