source: GTP/trunk/Lib/Vis/Preprocessing/src/GlobalLinesRenderer.h @ 1941

Revision 1941, 1.4 KB checked in by mattausch, 18 years ago (diff)
Line 
1#ifndef __GLOBALLINESRENDERER_H
2#define __GLOBALLINESRENDERER_H
3
4#include "common.h"
5#include "Containers.h"
6
7class RenderTexture;
8
9namespace GtpVisibilityPreprocessor {
10
11class Beam;
12class Intersectable;
13class Preprocessor;
14class GlRenderer;
15
16struct VssRayContainer;
17
18class GlobalLinesRenderer
19{
20public:
21        /*GlobalLinesRenderer(RenderTexture *buffer1,
22                                                RenderTexture *buffer2,
23                                                Preprocessor *preprocessor,
24                                                GlRenderer *renderer);
25*/
26        GlobalLinesRenderer(Preprocessor *preprocessor, GlRenderer *renderer);
27
28        ~GlobalLinesRenderer();
29
30        void CastGlobalLines(Beam &beam, const int samples);
31
32        void InitGl();
33
34        /** Computes rays from information gained with hw sampling
35        */
36        void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays);
37
38        float GetPixelError(int &pvsSize);
39
40        int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const;
41
42        void RenderObject(Intersectable *obj);
43void DrawGeometry();
44void Run();
45protected:
46
47        void ProcessDepthBuffer();
48
49        /** Draws the geometry for one pass.
50        */
51       
52
53        void ApplyDepthPeeling(Beam &beam, const int samples);
54
55        void SwitchRenderTextures();
56
57        void SetupProjection(const Vector3 &viewPoint,
58                                                 const Beam &beam);
59
60        RenderTexture *mNewBuffer;
61        RenderTexture *mOldBuffer;
62
63        Preprocessor *mPreprocessor;
64        int mMaxDepth;
65
66        GlRenderer *mRenderer;
67};
68
69extern GlobalLinesRenderer *globalLinesRenderer;
70
71};
72
73#endif
74
Note: See TracBrowser for help on using the repository browser.