LightSpacePerspectiveShadowMap
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*
* ViewDependentShadow codes Copyright (C) 2008 Wojciech Lewandowski
* Thanks to to my company http://www.ai.com.pl for allowing me free this work.
*/
#ifndef OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP
#define OSGSHADOW_LIGHTSPACEPERSPECTIVESHADOWMAP 1
#include <osgShadow/MinimalCullBoundsShadowMap>
#include <osgShadow/MinimalDrawBoundsShadowMap>
#include <osgShadow/ProjectionShadowMap>
namespace osgShadow {
// Class implements
// "Light Space Perspective Shadow Maps" algorithm by
// Michael Wimmer, Daniel Scherzer, Werner Purgathofer
// http://www.cg.tuwien.ac.at/research/vr/lispsm/
class LispSM;
class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapAlgorithm
{
public:
LightSpacePerspectiveShadowMapAlgorithm();
~LightSpacePerspectiveShadowMapAlgorithm();
void operator() (
const osgShadow::ConvexPolyhedron* hullShadowedView,
const osg::Camera* cameraMain,
osg::Camera* cameraShadow ) const;
protected:
LispSM * lispsm;
};
// Optimized for draw traversal shadow bounds
class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapDB: public ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
{
public:
typedef ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass;
LightSpacePerspectiveShadowMapDB()
{
}
LightSpacePerspectiveShadowMapDB(
const LightSpacePerspectiveShadowMapDB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
META_Object( osgShadow, LightSpacePerspectiveShadowMapDB );
};
// Optimized for cull traversal shadow bounds
class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapCB: public ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
{
public:
typedef ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass;
LightSpacePerspectiveShadowMapCB()
{
}
LightSpacePerspectiveShadowMapCB(
const LightSpacePerspectiveShadowMapCB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
META_Object( osgShadow, LightSpacePerspectiveShadowMapCB );
};
// Optimized for view frustum bounds
class OSGSHADOW_EXPORT LightSpacePerspectiveShadowMapVB: public ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
{
public:
typedef ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass;
LightSpacePerspectiveShadowMapVB()
{
}
LightSpacePerspectiveShadowMapVB(
const LightSpacePerspectiveShadowMapVB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
META_Object( osgShadow, LightSpacePerspectiveShadowMapVB );
};
typedef LightSpacePerspectiveShadowMapDB LightSpacePerspectiveShadowMap;
} // namespace osgShadow
#endif
MinimalCullBoundsShadowMap
MinimalDrawBoundsShadowMap
ProjectionShadowMap
osgShadow::ConvexPolyhedron
Definition ConvexPolyhedron:36
osgShadow::LightSpacePerspectiveShadowMapAlgorithm::lispsm
LispSM * lispsm
Definition LightSpacePerspectiveShadowMap:46
osgShadow::LightSpacePerspectiveShadowMapAlgorithm::~LightSpacePerspectiveShadowMapAlgorithm
~LightSpacePerspectiveShadowMapAlgorithm()
osgShadow::LightSpacePerspectiveShadowMapAlgorithm::LightSpacePerspectiveShadowMapAlgorithm
LightSpacePerspectiveShadowMapAlgorithm()
osgShadow::LightSpacePerspectiveShadowMapCB::LightSpacePerspectiveShadowMapCB
LightSpacePerspectiveShadowMapCB(const LightSpacePerspectiveShadowMapCB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition LightSpacePerspectiveShadowMap:85
osgShadow::LightSpacePerspectiveShadowMapCB::BaseClass
ProjectionShadowMap< MinimalCullBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
Definition LightSpacePerspectiveShadowMap:77
osgShadow::LightSpacePerspectiveShadowMapCB::META_Object
META_Object(osgShadow, LightSpacePerspectiveShadowMapCB)
osgShadow::LightSpacePerspectiveShadowMapCB::LightSpacePerspectiveShadowMapCB
LightSpacePerspectiveShadowMapCB()
Definition LightSpacePerspectiveShadowMap:80
osgShadow::LightSpacePerspectiveShadowMapDB
Definition LightSpacePerspectiveShadowMap:51
osgShadow::LightSpacePerspectiveShadowMapDB::LightSpacePerspectiveShadowMapDB
LightSpacePerspectiveShadowMapDB(const LightSpacePerspectiveShadowMapDB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition LightSpacePerspectiveShadowMap:62
osgShadow::LightSpacePerspectiveShadowMapDB::BaseClass
ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
Definition LightSpacePerspectiveShadowMap:54
osgShadow::LightSpacePerspectiveShadowMapDB::LightSpacePerspectiveShadowMapDB
LightSpacePerspectiveShadowMapDB()
Definition LightSpacePerspectiveShadowMap:57
osgShadow::LightSpacePerspectiveShadowMapDB::META_Object
META_Object(osgShadow, LightSpacePerspectiveShadowMapDB)
osgShadow::LightSpacePerspectiveShadowMapVB::META_Object
META_Object(osgShadow, LightSpacePerspectiveShadowMapVB)
osgShadow::LightSpacePerspectiveShadowMapVB::BaseClass
ProjectionShadowMap< MinimalShadowMap, LightSpacePerspectiveShadowMapAlgorithm > BaseClass
Definition LightSpacePerspectiveShadowMap:100
osgShadow::LightSpacePerspectiveShadowMapVB::LightSpacePerspectiveShadowMapVB
LightSpacePerspectiveShadowMapVB(const LightSpacePerspectiveShadowMapVB &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition LightSpacePerspectiveShadowMap:108
osgShadow::LightSpacePerspectiveShadowMapVB::LightSpacePerspectiveShadowMapVB
LightSpacePerspectiveShadowMapVB()
Definition LightSpacePerspectiveShadowMap:103
osgShadow::ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >
osgShadow::ProjectionShadowMap< MinimalDrawBoundsShadowMap, LightSpacePerspectiveShadowMapAlgorithm >::ProjectionShadowMap
ProjectionShadowMap()
Definition ProjectionShadowMap:34
osg::Camera
Definition Camera:45
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osgShadow
Definition ConvexPolyhedron:33
osgShadow::LightSpacePerspectiveShadowMap
LightSpacePerspectiveShadowMapDB LightSpacePerspectiveShadowMap
Definition LightSpacePerspectiveShadowMap:118
OSGSHADOW_EXPORT
#define OSGSHADOW_EXPORT
Definition osgShadow/Export:39