MinimalCullBoundsShadowMap
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_MINIMALCULLBOUNDSSHADOWMAP
#define OSGSHADOW_MINIMALCULLBOUNDSSHADOWMAP 1
#include <osgShadow/MinimalShadowMap>
namespace osgShadow {
class OSGSHADOW_EXPORT MinimalCullBoundsShadowMap
: public MinimalShadowMap
{
public :
typedef MinimalCullBoundsShadowMap ThisClass;
typedef MinimalShadowMap BaseClass;
MinimalCullBoundsShadowMap();
MinimalCullBoundsShadowMap(
const MinimalCullBoundsShadowMap& mcbsm,
const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object( osgShadow, MinimalCullBoundsShadowMap );
protected:
virtual ~MinimalCullBoundsShadowMap(void);
struct OSGSHADOW_EXPORT ViewData: public MinimalShadowMap::ViewData
{
virtual void init( ThisClass * st, osgUtil::CullVisitor * cv );
virtual void cullShadowReceivingScene( );
virtual void aimShadowCastingCamera( const osg::Light *light,
const osg::Vec4 &worldLightPos,
const osg::Vec3 &worldLightDir,
const osg::Vec3 &worldLightUp
= osg::Vec3(0,1,0) );
typedef std::vector< osgUtil::RenderLeaf* > RenderLeafList;
static unsigned RemoveOldRenderLeaves
( RenderLeafList &rllNew, RenderLeafList &rllOld );
static unsigned RemoveIgnoredRenderLeaves( RenderLeafList &rll );
static osg::BoundingBox ComputeRenderLeavesBounds
( RenderLeafList &rll, osg::Matrix & projectionToWorld );
static osg::BoundingBox ComputeRenderLeavesBounds
( RenderLeafList &rll, osg::Matrix & projectionToWorld, osg::Polytope & polytope );
static void GetRenderLeaves
( osgUtil::RenderBin *rb, RenderLeafList &rll );
};
META_ViewDependentShadowTechniqueData( ThisClass, ThisClass::ViewData )
};
} // namespace osgShadow
#endif
MinimalShadowMap
META_ViewDependentShadowTechniqueData
#define META_ViewDependentShadowTechniqueData(ShadowTechnique, TechniqueData)
Definition ViewDependentShadowTechnique:32
osgShadow::MinimalCullBoundsShadowMap::BaseClass
MinimalShadowMap BaseClass
Definition MinimalCullBoundsShadowMap:31
osgShadow::MinimalCullBoundsShadowMap::META_Object
META_Object(osgShadow, MinimalCullBoundsShadowMap)
osgShadow::MinimalCullBoundsShadowMap::MinimalCullBoundsShadowMap
MinimalCullBoundsShadowMap()
osgShadow::MinimalCullBoundsShadowMap::ThisClass
MinimalCullBoundsShadowMap ThisClass
Definition MinimalCullBoundsShadowMap:29
osgShadow::MinimalCullBoundsShadowMap::~MinimalCullBoundsShadowMap
virtual ~MinimalCullBoundsShadowMap(void)
osgShadow::MinimalCullBoundsShadowMap::MinimalCullBoundsShadowMap
MinimalCullBoundsShadowMap(const MinimalCullBoundsShadowMap &mcbsm, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgShadow::MinimalShadowMap::MinimalShadowMap
MinimalShadowMap()
osgUtil::CullVisitor
Definition CullVisitor:49
osgUtil::RenderBin
Definition RenderBin:34
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Light
Definition Light:40
osg::Polytope
Definition Polytope:26
osgShadow
Definition ConvexPolyhedron:33
osg::Vec3
Vec3f Vec3
Definition Vec3:21
osg::BoundingBox
BoundingBoxd BoundingBox
Definition BoundingBox:257
osg::Matrix
Matrixd Matrix
Definition Matrix:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
OSGSHADOW_EXPORT
#define OSGSHADOW_EXPORT
Definition osgShadow/Export:39
osgShadow::MinimalCullBoundsShadowMap::ViewData
Definition MinimalCullBoundsShadowMap:49
osgShadow::MinimalCullBoundsShadowMap::ViewData::RemoveOldRenderLeaves
static unsigned RemoveOldRenderLeaves(RenderLeafList &rllNew, RenderLeafList &rllOld)
osgShadow::MinimalCullBoundsShadowMap::ViewData::GetRenderLeaves
static void GetRenderLeaves(osgUtil::RenderBin *rb, RenderLeafList &rll)
osgShadow::MinimalCullBoundsShadowMap::ViewData::aimShadowCastingCamera
virtual void aimShadowCastingCamera(const osg::Light *light, const osg::Vec4 &worldLightPos, const osg::Vec3 &worldLightDir, const osg::Vec3 &worldLightUp=osg::Vec3(0, 1, 0))
osgShadow::MinimalCullBoundsShadowMap::ViewData::RemoveIgnoredRenderLeaves
static unsigned RemoveIgnoredRenderLeaves(RenderLeafList &rll)
osgShadow::MinimalCullBoundsShadowMap::ViewData::init
virtual void init(ThisClass *st, osgUtil::CullVisitor *cv)
osgShadow::MinimalCullBoundsShadowMap::ViewData::cullShadowReceivingScene
virtual void cullShadowReceivingScene()
osgShadow::MinimalCullBoundsShadowMap::ViewData::ComputeRenderLeavesBounds
static osg::BoundingBox ComputeRenderLeavesBounds(RenderLeafList &rll, osg::Matrix &projectionToWorld, osg::Polytope &polytope)
osgShadow::MinimalCullBoundsShadowMap::ViewData::RenderLeafList
std::vector< osgUtil::RenderLeaf * > RenderLeafList
Definition MinimalCullBoundsShadowMap:60
osgShadow::MinimalCullBoundsShadowMap::ViewData::ComputeRenderLeavesBounds
static osg::BoundingBox ComputeRenderLeavesBounds(RenderLeafList &rll, osg::Matrix &projectionToWorld)
osgShadow::MinimalShadowMap::ViewData
Definition MinimalShadowMap:101