Fix for renaming of ShadowOccluderVolume to ShadowVolumeOccluder.
This commit is contained in:
parent
c7e99ff77a
commit
e467027946
@ -6,7 +6,7 @@
|
||||
#define OSG_CullingSet 1
|
||||
|
||||
#include <osg/Polytope>
|
||||
#include <osg/ShadowOccluderVolume>
|
||||
#include <osg/ShadowVolumeOccluder>
|
||||
#include <osg/Referenced>
|
||||
|
||||
namespace osg {
|
||||
|
@ -27,13 +27,13 @@ class SG_EXPORT ShadowVolumeOccluder
|
||||
_occluderVolume(soc._occluderVolume),
|
||||
_holeList(soc._holeList) {}
|
||||
|
||||
ShadowVolumeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MVP)
|
||||
ShadowVolumeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MV,const Matrix& P)
|
||||
{
|
||||
computeOccluder(nodePath,occluder,MVP);
|
||||
computeOccluder(nodePath,occluder,MV,P);
|
||||
}
|
||||
|
||||
/** compute the shadow volume occluder. */
|
||||
void computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MVP);
|
||||
void computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MV,const Matrix& P);
|
||||
|
||||
|
||||
inline void disableResultMasks();
|
||||
|
@ -114,7 +114,7 @@ void CollectOccludersVisitor::apply(osg::OccluderNode& node)
|
||||
|
||||
// need to test occluder against view frustum.
|
||||
std::cout << " adding in Occluder"<<std::endl;
|
||||
_occluderList.push_back(ShadowVolumeOccluder(_nodePath, *node.getOccluder(), getModelViewMatrix()));
|
||||
_occluderList.push_back(ShadowVolumeOccluder(_nodePath, *node.getOccluder(), getModelViewMatrix(),getProjectionMatrix()));
|
||||
}
|
||||
|
||||
traverse(node);
|
||||
|
@ -1,11 +1,21 @@
|
||||
#include <osg/ShadowOccluderVolume>
|
||||
#include <osg/ShadowVolumeOccluder>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
void ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MVP)
|
||||
void ShadowVolumeOccluder::computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,const Matrix& MV,const Matrix& P)
|
||||
{
|
||||
std::cout<<" Computing Occluder"<<std::endl;
|
||||
|
||||
// for the occluder polygon and each of the holes do
|
||||
// first transform occluder polygon into clipspace by multiple it by c[i] = v[i]*(MV*P)
|
||||
// then push to coords to far plane by setting its coord to c[i].z = -1.
|
||||
// then transform far plane polygon back into projection space, by p[i]*inv(P)
|
||||
// compute orientation of front plane, if normal.z()<0 then facing away from eye pont, so reverse the polygons, or simply invert planes.
|
||||
// compute volume (quality) betwen front polygon in projection space and back polygon in projection space.
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool ShadowVolumeOccluder::contains(const std::vector<Vec3>& vertices)
|
||||
|
Loading…
Reference in New Issue
Block a user