OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LightSpacePerspectiveShadowMap.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12  *
13  * ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski
14  * Thanks to to my company http://www.ai.com.pl for allowing me free this work.
15 */
16 
17 
18 #ifndef OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP
19 #define OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP 1
20 
21 #include <osgShadow/MinimalCullBoundsShadowMap>
22 #include <osgShadow/MinimalDrawBoundsShadowMap>
23 #include <osgShadow/ProjectionShadowMap>
24 
25 namespace osgShadow {
26 
27 // Class implements
28 // "Light Space Perspective Shadow Maps" algorithm by
29 // Michael Wimmer, Daniel Scherzer, Werner Purgathofer
30 // http://www.cg.tuwien.ac.at/research/vr/lispsm/
31 
32 class LispSM;
33 
35 {
36  public:
39 
40  void operator() (
41  const osgShadow::ConvexPolyhedron* hullShadowedView,
42  const osg::Camera* cameraMain,
43  osg::Camera* cameraShadow ) const;
44 
45  protected:
46  LispSM * lispsm;
47 };
48 
49 // Optimized for draw traversal shadow bounds
50 class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapDB: public ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
51 {
52  public:
55 
58  {
59  }
60 
64  const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
65  {
66  }
67 
70 };
71 
72 // Optimized for cull traversal shadow bounds
73 class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapCB: public ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
74 {
75  public:
78 
81  {
82  }
83 
87  const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
88  {
89  }
90 
93 };
94 
95 // Optimized for view frustum bounds
96 class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapVB: public ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
97 {
98  public:
101 
104  {
105  }
106 
110  const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
111  {
112  }
113 
116 };
117 
119 
120 } // namespace osgShadow
121 
122 #endif
ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
LightSpacePerspectiveShadowMapDB(const LightSpacePerspectiveShadowMapDB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
LightSpacePerspectiveShadowMapVB(const LightSpacePerspectiveShadowMapVB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
LightSpacePerspectiveShadowMapDB LightSpacePerspectiveShadowMap
#define OSGSHADOW_EXPORT
Definition: Export.h:39
#define META_Object(library, name)
Definition: Object.h:42
LightSpacePerspectiveShadowMapCB(const LightSpacePerspectiveShadowMapCB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)