本文整理汇总了C++中Sector::executeCallbacks方法的典型用法代码示例。如果您正苦于以下问题:C++ Sector::executeCallbacks方法的具体用法?C++ Sector::executeCallbacks怎么用?C++ Sector::executeCallbacks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sector
的用法示例。
在下文中一共展示了Sector::executeCallbacks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: extractVisibleActors
//-----------------------------------------------------------------------------
void SceneManagerPortals::extractVisibleActors(ActorCollection& list, const Camera* camera)
{
if (cullingEnabled())
{
Sector* start = computeStartingSector(camera);
if (!start)
extractActors(list);
else
{
++mVisitTick;
mTempActors.clear();
mFrustumStack.clear();
mFrustumStack.push_back(camera->frustum());
start->executeCallbacks(camera,this,NULL);
visitSector(NULL, start, camera->modelingMatrix().getT(), camera);
// remove duplicates
std::sort(mTempActors.begin(), mTempActors.end());
std::vector< ref<Actor> >::iterator new_end = std::unique(mTempActors.begin(), mTempActors.end());
for(std::vector< ref<Actor> >::iterator it = mTempActors.begin(); it != new_end; ++it)
list.push_back(it->get());
}
}
else
extractActors(list);
}
示例2: extractVisibleActors
//-----------------------------------------------------------------------------
void SceneManagerPortals::extractVisibleActors(ActorCollection& list, const Camera* camera)
{
if (cullingEnabled())
{
Sector* start = computeStartingSector(camera);
if (!start)
extractActors(list);
else
{
++mVisitTick;
mTempActors.clear();
mFrustumStack.clear();
mFrustumStack.push_back(camera->frustum());
start->executeCallbacks(camera,this,NULL);
visitSector(NULL, start, camera->modelingMatrix().getT(), camera);
// insert portal actors
if (showPortals())
{
for(std::map<Portal*, ref<Actor> >::const_iterator it = mPortalActorMap.begin(); it != mPortalActorMap.end(); ++it)
mTempActors.push_back(it->second);
}
// mic fixme: isn't quicker to use sets instead of sort()+unique()?
// avoid reporting duplicates
std::sort(mTempActors.begin(), mTempActors.end());
std::vector< ref<Actor> >::iterator new_end = std::unique(mTempActors.begin(), mTempActors.end());
for(std::vector< ref<Actor> >::iterator it = mTempActors.begin(); it != new_end; ++it)
list.push_back(it->get());
}
}
else
extractActors(list);
}