Removed TrapezoidalShadowMap due to discovery of patent on algorithm.

This commit is contained in:
Robert Osfield
2011-02-24 11:54:44 +00:00
parent 56a8dc7c92
commit a7fd352b40
4 changed files with 8 additions and 845 deletions

View File

@@ -1,123 +0,0 @@
/* -*-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_TRAPEZOIDALSHADOWMAP
#define OSGSHADOW_TRAPEZOIDALSHADOWMAP 1
#include <osgShadow/MinimalCullBoundsShadowMap>
#include <osgShadow/MinimalDrawBoundsShadowMap>
#include <osgShadow/ProjectionShadowMap>
namespace osgShadow {
// Class implements
// "Anti-aliasing and Continuity with Trapezoidal Shadow Maps"
// Tobias Martin (tobiasmartin@t-online.de) and Tiow-Seng Tan (tants@comp.nus.edu.sg)
// School of Computing, National University of Singapore
// http://www.comp.nus.edu.sg/~tants/tsm.html
struct TrapezoidalMapping;
class OSGSHADOW_EXPORT TrapezoidalShadowMapAlgorithm
{
public:
TrapezoidalShadowMapAlgorithm();
~TrapezoidalShadowMapAlgorithm();
void operator() (
const osgShadow::ConvexPolyhedron* hullShadowedView,
const osg::Camera* cameraMain,
osg::Camera* cameraShadow ) const;
protected:
TrapezoidalMapping * tm;
};
// Optimized for draw traversal shadow bounds
class OSGSHADOW_EXPORT TrapezoidalShadowMapDB: public ProjectionShadowMap< MinimalDrawBoundsShadowMap, TrapezoidalShadowMapAlgorithm >
{
public:
/** Convenient typedef used in definition of ViewData struct and methods */
typedef ProjectionShadowMap< MinimalDrawBoundsShadowMap, TrapezoidalShadowMapAlgorithm > BaseClass;
/** Classic OSG constructor */
TrapezoidalShadowMapDB()
{
}
/** Classic OSG cloning constructor */
TrapezoidalShadowMapDB(
const TrapezoidalShadowMapDB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
/** Declaration of standard OSG object methods */
META_Object( osgShadow, TrapezoidalShadowMapDB );
};
// Optimized for cull traversal shadow bounds
class OSGSHADOW_EXPORT TrapezoidalShadowMapCB: public ProjectionShadowMap< MinimalCullBoundsShadowMap, TrapezoidalShadowMapAlgorithm >
{
public:
/** Convenient typedef used in definition of ViewData struct and methods */
typedef ProjectionShadowMap< MinimalCullBoundsShadowMap, TrapezoidalShadowMapAlgorithm > BaseClass;
/** Classic OSG constructor */
TrapezoidalShadowMapCB()
{
}
/** Classic OSG cloning constructor */
TrapezoidalShadowMapCB(
const TrapezoidalShadowMapCB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
/** Declaration of standard OSG object methods */
META_Object( osgShadow, TrapezoidalShadowMapCB );
};
// Optimized for view frustum bounds
class OSGSHADOW_EXPORT TrapezoidalShadowMapVB: public ProjectionShadowMap< MinimalShadowMap, TrapezoidalShadowMapAlgorithm >
{
public:
/** Convenient typedef used in definition of ViewData struct and methods */
typedef ProjectionShadowMap< MinimalShadowMap, TrapezoidalShadowMapAlgorithm > BaseClass;
/** Classic OSG constructor */
TrapezoidalShadowMapVB()
{
}
/** Classic OSG cloning constructor */
TrapezoidalShadowMapVB(
const TrapezoidalShadowMapVB& copy,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : BaseClass(copy,copyop)
{
}
/** Declaration of standard OSG object methods */
META_Object( osgShadow, TrapezoidalShadowMapVB );
};
typedef TrapezoidalShadowMapDB TrapezoidalShadowMap;
} // namespace osgShadow
#endif