2002-06-03 23:39:41 +08:00
|
|
|
#include <osg/CullingSet>
|
|
|
|
|
|
|
|
using namespace osg;
|
|
|
|
|
|
|
|
CullingSet::CullingSet()
|
|
|
|
{
|
2002-06-04 01:49:28 +08:00
|
|
|
_mask = ALL_CULLING;
|
2002-06-04 23:21:24 +08:00
|
|
|
_pixelSizeVector.set(0,0,0,1);
|
|
|
|
_smallFeatureCullingPixelSize=1.0f;
|
2002-06-03 23:39:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
CullingSet::~CullingSet()
|
|
|
|
{
|
|
|
|
}
|
2002-06-14 00:21:00 +08:00
|
|
|
|
|
|
|
void CullingSet::disableOccluder(NodePath& nodePath)
|
|
|
|
{
|
|
|
|
//std::cout<<" trying to disable occluder"<<std::endl;
|
|
|
|
for(OccluderList::iterator itr=_occluderList.begin();
|
|
|
|
itr!=_occluderList.end();
|
|
|
|
++itr)
|
|
|
|
{
|
|
|
|
if (itr->getNodePath()==nodePath)
|
|
|
|
{
|
|
|
|
//std::cout<<" ++ disabling occluder"<<std::endl;
|
|
|
|
// we have trapped for the case an occlude potentially occluding itself,
|
|
|
|
// to prevent this we disable the results mask so that no subsequnt
|
|
|
|
// when the next pushCurrentMask calls happens this occluder is switched off.
|
|
|
|
itr->disableResultMasks();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2002-06-15 20:14:42 +08:00
|
|
|
|