1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkDefaultPass.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 // .NAME vtkDefaultPass - Implement the basic render passes.
16 // .SECTION Description
17 // vtkDefaultPass implements the basic standard render passes of VTK.
18 // Subclasses can easily be implemented by reusing some parts of the basic
19 // implementation.
20 //
21 // It implements classic Render operations as well as versions with property
22 // key checking.
23 //
24 // This pass expects an initialized depth buffer and color buffer.
25 // Initialized buffers means they have been cleared with farest z-value and
26 // background color/gradient/transparent color.
27 //
28 // .SECTION See Also
29 // vtkRenderPass
30 
31 #ifndef vtkDefaultPass_h
32 #define vtkDefaultPass_h
33 
34 #include "vtkRenderingOpenGL2Module.h" // For export macro
35 #include "vtkRenderPass.h"
36 
37 class vtkOpenGLRenderWindow;
38 class vtkDefaultPassLayerList; // Pimpl
39 
40 class VTKRENDERINGOPENGL2_EXPORT vtkDefaultPass : public vtkRenderPass
41 {
42 public:
43   static vtkDefaultPass *New();
44   vtkTypeMacro(vtkDefaultPass,vtkRenderPass);
45   void PrintSelf(ostream& os, vtkIndent indent);
46 
47   //BTX
48   // Description:
49   // Perform rendering according to a render state \p s.
50   // Call RenderOpaqueGeometry(), RenderTranslucentPolygonalGeometry(),
51   // RenderVolumetricGeometry(), RenderOverlay()
52   // \pre s_exists: s!=0
53   virtual void Render(const vtkRenderState *s);
54   //ETX
55 
56  protected:
57   // Description:
58   // Default constructor.
59   vtkDefaultPass();
60 
61   // Description:
62   // Destructor.
63   virtual ~vtkDefaultPass();
64 
65   // Description:
66   // Opaque pass without key checking.
67   // \pre s_exists: s!=0
68   virtual void RenderOpaqueGeometry(const vtkRenderState *s);
69 
70   // Description:
71   // Opaque pass with key checking.
72   // \pre s_exists: s!=0
73   virtual void RenderFilteredOpaqueGeometry(const vtkRenderState *s);
74 
75   // Description:
76   // Translucent pass without key checking.
77   // \pre s_exists: s!=0
78   virtual void RenderTranslucentPolygonalGeometry(const vtkRenderState *s);
79 
80   // Description:
81   // Translucent pass with key checking.
82   // \pre s_exists: s!=0
83   virtual void RenderFilteredTranslucentPolygonalGeometry(
84     const vtkRenderState *s);
85 
86   // Description:
87   // Volume pass without key checking.
88   // \pre s_exists: s!=0
89   virtual void RenderVolumetricGeometry(const vtkRenderState *s);
90 
91   // Description:
92   // Translucent pass with key checking.
93   // \pre s_exists: s!=0
94   virtual void RenderFilteredVolumetricGeometry(const vtkRenderState *s);
95 
96   // Description:
97   // Overlay pass without key checking.
98   // \pre s_exists: s!=0
99   virtual void RenderOverlay(const vtkRenderState *s);
100 
101   // Description:
102   // Overlay pass with key checking.
103   // \pre s_exists: s!=0
104   virtual void RenderFilteredOverlay(const vtkRenderState *s);
105 
106  private:
107   vtkDefaultPass(const vtkDefaultPass&);  // Not implemented.
108   void operator=(const vtkDefaultPass&);  // Not implemented.
109 };
110 
111 #endif
112