本文整理汇总了C++中PCZSceneNode::_addToRenderQueue方法的典型用法代码示例。如果您正苦于以下问题:C++ PCZSceneNode::_addToRenderQueue方法的具体用法?C++ PCZSceneNode::_addToRenderQueue怎么用?C++ PCZSceneNode::_addToRenderQueue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PCZSceneNode
的用法示例。
在下文中一共展示了PCZSceneNode::_addToRenderQueue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findVisibleNodes
/*
// Recursively walk the zones, adding all visible SceneNodes to the list of visible nodes.
*/
void DefaultZone::findVisibleNodes(PCZCamera *camera,
NodeList & visibleNodeList,
RenderQueue * queue,
VisibleObjectsBoundsInfo* visibleBounds,
bool onlyShadowCasters,
bool displayNodes,
bool showBoundingBoxes)
{
//return immediately if nothing is in the zone.
if (mHomeNodeList.size() == 0 &&
mVisitorNodeList.size() == 0 &&
mPortals.size() == 0)
return ;
// Else, the zone is automatically assumed to be visible since either
// it is the camera the zone is in, or it was reached because
// a connecting portal was deemed visible to the camera.
// enable sky if called to do so for this zone
if (mHasSky)
{
// enable sky
mPCZSM->enableSky(true);
}
// find visible nodes at home in the zone
bool vis;
PCZSceneNodeList::iterator it = mHomeNodeList.begin();
while ( it != mHomeNodeList.end() )
{
PCZSceneNode * pczsn = *it;
// if the scene node is already visible, then we can skip it
if (pczsn->getLastVisibleFrame() != mLastVisibleFrame ||
pczsn->getLastVisibleFromCamera() != camera)
{
// for a scene node, check visibility using AABB
vis = camera ->isVisible( pczsn -> _getWorldAABB() );
if ( vis )
{
// add it to the list of visible nodes
visibleNodeList.push_back( pczsn );
// add the node to the render queue
pczsn -> _addToRenderQueue(camera, queue, onlyShadowCasters, visibleBounds );
// if we are displaying nodes, add the node renderable to the queue
if ( displayNodes )
{
queue -> addRenderable( pczsn->getDebugRenderable() );
}
// if the scene manager or the node wants the bounding box shown, add it to the queue
if (pczsn->getShowBoundingBox() || showBoundingBoxes)
{
pczsn->_addBoundingBoxToQueue(queue);
}
// flag the node as being visible this frame
pczsn->setLastVisibleFrame(mLastVisibleFrame);
pczsn->setLastVisibleFromCamera(camera);
}
}
++it;
}
// find visible visitor nodes
it = mVisitorNodeList.begin();
while ( it != mVisitorNodeList.end() )
{
PCZSceneNode * pczsn = *it;
// if the scene node is already visible, then we can skip it
if (pczsn->getLastVisibleFrame() != mLastVisibleFrame ||
pczsn->getLastVisibleFromCamera() != camera)
{
// for a scene node, check visibility using AABB
vis = camera ->isVisible( pczsn -> _getWorldAABB() );
if ( vis )
{
// add it to the list of visible nodes
visibleNodeList.push_back( pczsn );
// add the node to the render queue
pczsn->_addToRenderQueue(camera, queue, onlyShadowCasters, visibleBounds );
// if we are displaying nodes, add the node renderable to the queue
if ( displayNodes )
{
queue -> addRenderable( pczsn->getDebugRenderable() );
}
// if the scene manager or the node wants the bounding box shown, add it to the queue
if (pczsn->getShowBoundingBox() || showBoundingBoxes)
{
pczsn->_addBoundingBoxToQueue(queue);
}
// flag the node as being visible this frame
pczsn->setLastVisibleFrame(mLastVisibleFrame);
pczsn->setLastVisibleFromCamera(camera);
}
}
++it;
}
// Here we merge both portal and antiportal visible to the camera into one list.
//.........这里部分代码省略.........