本文整理汇总了C++中PCZSceneNodeList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ PCZSceneNodeList::begin方法的具体用法?C++ PCZSceneNodeList::begin怎么用?C++ PCZSceneNodeList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCZSceneNodeList
的用法示例。
在下文中一共展示了PCZSceneNodeList::begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//---------------------------------------------------------------------
void PCZPlaneBoundedVolumeListSceneQuery::execute(SceneQueryListener* listener)
{
std::set<SceneNode*> checkedSceneNodes;
PlaneBoundedVolumeList::iterator pi, piend;
piend = mVolumes.end();
for (pi = mVolumes.begin(); pi != piend; ++pi)
{
PCZSceneNodeList list;
//find the nodes that intersect the Plane bounded Volume
static_cast<PCZSceneManager*>( mParentSceneMgr ) -> findNodesIn( *pi, list, mStartZone, (PCZSceneNode*)mExcludeNode );
//grab all moveables from the node that intersect...
PCZSceneNodeList::iterator it, itend;
itend = list.end();
for (it = list.begin(); it != itend; ++it)
{
// avoid double-check same scene node
if (!checkedSceneNodes.insert(*it).second)
continue;
SceneNode::ObjectIterator oit = (*it) -> getAttachedObjectIterator();
while( oit.hasMoreElements() )
{
MovableObject * m = oit.getNext();
if( (m->getQueryFlags() & mQueryMask) &&
(m->getTypeFlags() & mQueryTypeMask) &&
m->isInScene() &&
(*pi).intersects( m->getWorldBoundingBox() ) )
{
listener -> queryResult( m );
// deal with attached objects, since they are not directly attached to nodes
if (m->getMovableType() == "Entity")
{
Entity* e = static_cast<Entity*>(m);
Entity::ChildObjectListIterator childIt = e->getAttachedObjectIterator();
while(childIt.hasMoreElements())
{
MovableObject* c = childIt.getNext();
if (c->getQueryFlags() & mQueryMask &&
(*pi).intersects( c->getWorldBoundingBox()))
{
listener->queryResult(c);
}
}
}
}
}
}
}//for
// reset startzone and exclude node
mStartZone = 0;
mExcludeNode = 0;
}