VTK
vtkShadowMapBakerPass.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkShadowMapPass.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=========================================================================*/
46#ifndef vtkShadowMapBakerPass_h
47#define vtkShadowMapBakerPass_h
48
49#include "vtkRenderingOpenGLModule.h" // For export macro
50#include "vtkRenderPass.h"
51
54class vtkCamera;
55class vtkLight;
57class vtkShadowMapBakerPassTextures; // internal
58class vtkShadowMapBakerPassLightCameras; // internal
59
60class VTKRENDERINGOPENGL_EXPORT vtkShadowMapBakerPass : public vtkRenderPass
61{
62public:
65 void PrintSelf(ostream& os, vtkIndent indent);
66
73
74 // If this key exists on the Propertykeys of a prop, the prop is viewed as a
75 // light/shadow receiver. This key is not mutually exclusive with the
76 // OCCLUDER() key.
78
83 virtual void Render(const vtkRenderState *s);
84
91
93
100 vtkGetObjectMacro(OpaquePass,vtkRenderPass);
101 virtual void SetOpaquePass(vtkRenderPass *opaquePass);
103
105
111 vtkGetObjectMacro(CompositeZPass,vtkRenderPass);
112 virtual void SetCompositeZPass(vtkRenderPass *compositeZPass);
114
116
121 vtkSetMacro(Resolution,unsigned int);
122 vtkGetMacro(Resolution,unsigned int);
124
126
136 vtkSetMacro(PolygonOffsetFactor,float);
137 vtkGetMacro(PolygonOffsetFactor,float);
139
141
153 vtkSetMacro(PolygonOffsetUnits,float);
154 vtkGetMacro(PolygonOffsetUnits,float);
156
165
176
184
192
202
203 // // Description:
204 // INTERNAL USE ONLY.
205 // Internally used by vtkShadowMapBakerPass and vtkShadowMapPass.
206 //
207 // Set NeedUpate to false. Called by vtkShadowMapPass.
209
210 protected:
215
220
228 void PointNearFar(double *v,
229 double *pt,
230 double *dir,
231 double &mNear,
232 double &mFar,
233 bool initialized);
234
241 void BoxNearFar(double *bb,
242 double *pt,
243 double *dir,
244 double &mNear,
245 double &mFar);
246
253 double *boundingBox,
254 vtkCamera *lcamera);
255
261
263
265
266 unsigned int Resolution;
267
270
272
277
280
281
284
285private:
286 vtkShadowMapBakerPass(const vtkShadowMapBakerPass&) VTK_DELETE_FUNCTION;
287 void operator=(const vtkShadowMapBakerPass&) VTK_DELETE_FUNCTION;
288};
289
290#endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
internal class which encapsulates OpenGL frame buffer object.
a simple class to control print indentation
Definition: vtkIndent.h:40
Key for integer values in vtkInformation.
a virtual light for 3D rendering
Definition: vtkLight.h:62
OpenGL rendering window.
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:59
Context in which a vtkRenderPass will render.
Implement a builder of shadow map pass.
vtkShadowMapBakerPass()
Default constructor.
static vtkInformationIntegerKey * OCCLUDER()
If this key exists on the PropertyKeys of a prop, the prop is viewed as a light occluder (ie it casts...
void ReleaseGraphicsResources(vtkWindow *w)
Release graphics resources and ask components to release their own resources.
void CheckSupport(vtkOpenGLRenderWindow *w)
Check if shadow mapping is supported by the current OpenGL context.
void BoxNearFar(double *bb, double *pt, double *dir, double &mNear, double &mFar)
Compute the min/max of the projection of a box in a given direction.
vtkShadowMapBakerPassTextures * GetShadowMaps()
INTERNAL USE ONLY Internally used by vtkShadowMapBakerPass and vtkShadowMapPass.
bool LightCreatesShadow(vtkLight *l)
INTERNAL USE ONLY.
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.
void PointNearFar(double *v, double *pt, double *dir, double &mNear, double &mFar, bool initialized)
Helper method to compute the mNearest point in a given direction.
vtkShadowMapBakerPassLightCameras * GetLightCameras()
INTERNAL USE ONLY.
vtkFrameBufferObject * FrameBufferObject
Graphics resources.
bool GetHasShadows()
INTERNAL USE ONLY.
void BuildCameraLight(vtkLight *light, double *boundingBox, vtkCamera *lcamera)
Build a camera from spot light parameters.
static vtkShadowMapBakerPass * New()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetOpaquePass(vtkRenderPass *opaquePass)
virtual ~vtkShadowMapBakerPass()
Destructor.
bool GetNeedUpdate()
INTERNAL USE ONLY.
vtkShadowMapBakerPassTextures * ShadowMaps
static vtkInformationIntegerKey * RECEIVER()
virtual void SetCompositeZPass(vtkRenderPass *compositeZPass)
vtkShadowMapBakerPassLightCameras * LightCameras
record modification and/or execution time
Definition: vtkTimeStamp.h:36
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ dir
Definition: vtkX3D.h:324
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.