本文整理汇总了C++中PCZone::_checkLightAgainstPortals方法的典型用法代码示例。如果您正苦于以下问题:C++ PCZone::_checkLightAgainstPortals方法的具体用法?C++ PCZone::_checkLightAgainstPortals怎么用?C++ PCZone::_checkLightAgainstPortals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCZone
的用法示例。
在下文中一共展示了PCZone::_checkLightAgainstPortals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateZones
//-----------------------------------------------------------------------
void PCZLight::updateZones(PCZone * defaultZone, unsigned long frameCount)
{
//update the zones this light affects
PCZone * homeZone;
affectedZonesList.clear();
mAffectsVisibleZone = false;
PCZSceneNode * sn = (PCZSceneNode*)(this->getParentSceneNode());
if (sn)
{
// start with the zone the light is in
homeZone = sn->getHomeZone();
if (homeZone)
{
affectedZonesList.push_back(homeZone);
if (homeZone->getLastVisibleFrame() == frameCount)
{
mAffectsVisibleZone = true;
}
}
else
{
// error - scene node has no homezone!
// just say it affects the default zone and leave it at that.
affectedZonesList.push_back(defaultZone);
if (defaultZone->getLastVisibleFrame() == frameCount)
{
mAffectsVisibleZone = true;
}
return;
}
}
else
{
// ERROR! not connected to a scene node,
// just say it affects the default zone and leave it at that.
affectedZonesList.push_back(defaultZone);
if (defaultZone->getLastVisibleFrame() == frameCount)
{
mAffectsVisibleZone = true;
}
return;
}
// now check visibility of each portal in the home zone. If visible to
// the light then add the target zone of the portal to the list of
// affected zones and recurse into the target zone
static PCZFrustum portalFrustum;
Vector3 v = getDerivedPosition();
portalFrustum.setOrigin(v);
homeZone->_checkLightAgainstPortals(this, frameCount, &portalFrustum, 0);
}