本文整理汇总了C++中ChildIterator::getNext方法的典型用法代码示例。如果您正苦于以下问题:C++ ChildIterator::getNext方法的具体用法?C++ ChildIterator::getNext怎么用?C++ ChildIterator::getNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChildIterator
的用法示例。
在下文中一共展示了ChildIterator::getNext方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findElementAt
OverlayElement* OverlayContainer::findElementAt(Real x, Real y) // relative to parent
{
OverlayElement* ret = NULL;
int currZ = -1;
if (mVisible)
{
ret = OverlayElement::findElementAt(x,y); //default to the current container if no others are found
if (ret && mChildrenProcessEvents)
{
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
OverlayElement* currentOverlayElement = it.getNext();
if (currentOverlayElement->isVisible() && currentOverlayElement->isEnabled())
{
int z = currentOverlayElement->getZOrder();
if (z > currZ)
{
OverlayElement* elementFound = currentOverlayElement->findElementAt(x ,y );
if (elementFound)
{
currZ = z;
ret = elementFound;
}
}
}
}
}
}
return ret;
}
示例2: _positionsOutOfDate
//---------------------------------------------------------------------
void OverlayContainer::_positionsOutOfDate(void)
{
OverlayElement::_positionsOutOfDate();
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
it.getNext()->_positionsOutOfDate();
}
}
示例3: _notifyViewport
//---------------------------------------------------------------------
void OverlayContainer::_notifyViewport()
{
OverlayElement::_notifyViewport();
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
it.getNext()->_notifyViewport();
}
}
示例4: _notifyWorldTransforms
//---------------------------------------------------------------------
void OverlayContainer::_notifyWorldTransforms(const Matrix4& xform)
{
OverlayElement::_notifyWorldTransforms(xform);
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
it.getNext()->_notifyWorldTransforms(xform);
}
}
示例5: _notifyParent
//---------------------------------------------------------------------
void OverlayContainer::_notifyParent(OverlayContainer* parent, Overlay* overlay)
{
OverlayElement::_notifyParent(parent, overlay);
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
// Notify the children of the overlay
it.getNext()->_notifyParent(this, overlay);
}
}
示例6: _update
//---------------------------------------------------------------------
void OverlayContainer::_update(void)
{
// call superclass
OverlayElement::_update();
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
it.getNext()->_update();
}
}
示例7: _notifyZOrder
//---------------------------------------------------------------------
void OverlayContainer::_notifyZOrder(ushort newZOrder)
{
OverlayElement::_notifyZOrder(newZOrder);
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
// Give children ZOrder 1 higher than this
it.getNext()->_notifyZOrder(newZOrder + 1);
}
}
示例8: _notifyZOrder
//---------------------------------------------------------------------
ushort OverlayContainer::_notifyZOrder(ushort newZOrder)
{
OverlayElement::_notifyZOrder(newZOrder);
// One for us
newZOrder++;
// Update children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
// Children "consume" Z-order values, so keep track of them
newZOrder = it.getNext()->_notifyZOrder(newZOrder);
}
return newZOrder;
}
示例9: _updateRenderQueue
//---------------------------------------------------------------------
void OverlayContainer::_updateRenderQueue(RenderQueue* queue)
{
if (mVisible)
{
OverlayElement::_updateRenderQueue(queue);
// Also add children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
// Give children Z-order 1 higher than this
it.getNext()->_updateRenderQueue(queue);
}
}
}
示例10: _updateRenderQueue
/** Overridden from OverlayContainer */
void cCompassOverlay::_updateRenderQueue(RenderQueue* queue) {
if (mVisible)
{
if (!mTransparent && !mpMaterial.isNull())
{
OverlayElement::_updateRenderQueue(queue);
}
// Also add children
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
// Give children ZOrder 1 higher than this
it.getNext()->_updateRenderQueue(queue);
}
}
}
示例11: clone
OverlayElement* OverlayContainer::clone(const String& instanceName)
{
OverlayContainer *newContainer;
newContainer = static_cast<OverlayContainer*>(OverlayElement::clone(instanceName));
ChildIterator it = getChildIterator();
while (it.hasMoreElements())
{
OverlayElement* oldChildElement = it.getNext();
if (oldChildElement->isCloneable())
{
OverlayElement* newChildElement = oldChildElement->clone(instanceName);
newContainer->_addChild(newChildElement);
}
}
return newContainer;
}