Replaced attempt at passing NULL Matrix with two specialized methods.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14860 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-04-28 16:12:57 +00:00
parent e52b95e084
commit 8962838e6a
2 changed files with 15 additions and 10 deletions

View File

@@ -136,8 +136,8 @@ class OSGSHADOW_EXPORT MinimalShadowMap : public StandardShadowMap
const osg::BoundingBox &bb =
osg::BoundingBox(-1,-1,-1,1,1,1) );
osg::BoundingBox computeScenePolytopeBounds
( const osg::Matrix & m = *(osg::Matrix*)(NULL) );
osg::BoundingBox computeScenePolytopeBounds();
osg::BoundingBox computeScenePolytopeBounds(const osg::Matrix& m);
// Utility methods for adjusting projection matrices

View File

@@ -353,17 +353,22 @@ void MinimalShadowMap::ViewData::cutScenePolytope
_sceneReceivingShadowPolytope.clear();
}
osg::BoundingBox
MinimalShadowMap::ViewData::computeScenePolytopeBounds( const osg::Matrix & m )
osg::BoundingBox MinimalShadowMap::ViewData::computeScenePolytopeBounds()
{
osg::BoundingBox bb;
if( &m )
for( unsigned i = 0; i < _sceneReceivingShadowPolytopePoints.size(); ++i )
bb.expandBy( _sceneReceivingShadowPolytopePoints[i] * m );
else
for( unsigned i = 0; i < _sceneReceivingShadowPolytopePoints.size(); ++i )
bb.expandBy( _sceneReceivingShadowPolytopePoints[i] );
for( unsigned i = 0; i < _sceneReceivingShadowPolytopePoints.size(); ++i )
bb.expandBy( _sceneReceivingShadowPolytopePoints[i] );
return bb;
}
osg::BoundingBox MinimalShadowMap::ViewData::computeScenePolytopeBounds( const osg::Matrix & m )
{
osg::BoundingBox bb;
for( unsigned i = 0; i < _sceneReceivingShadowPolytopePoints.size(); ++i )
bb.expandBy( _sceneReceivingShadowPolytopePoints[i] * m );
return bb;
}