本文整理汇总了C++中ActorList::at方法的典型用法代码示例。如果您正苦于以下问题:C++ ActorList::at方法的具体用法?C++ ActorList::at怎么用?C++ ActorList::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActorList
的用法示例。
在下文中一共展示了ActorList::at方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getViewPointList
void LayersManager::getViewPointList(const std::string& targetID, ActorRefPtrList& viewPointList, int viewPointType)
{
ActorList childLayerList;
dynamic_cast<SingleLayerActor*>(_loadInLayer.get())->getAllChildren(childLayerList, CLASS_VIEWPOINTDEFINE, false, false);
for (unsigned int i = 0; i < childLayerList.size(); ++i)
{
std::string type = childLayerList.at(i)->getProperty(ACTOR_PROPERTY_VIEWPOINTTYPE)->toString();
std::stringstream ss;
ss << viewPointType;
if (viewPointType < 0 || type == ss.str())
viewPointList.push_back(dynamic_cast<VirtualDataSceneBase::TransformableActor*>(childLayerList.at(i)));
}
}
示例2: loadInLayer
void LayersManager::loadInLayer(VirtualDataSceneBase::TransformableActor* layer, StringList loadExclusionList, StringList unLoadExclusionList)
{
if (_loadInLayer == layer)
return;
unLoadInLayer(unLoadExclusionList);
dynamic_cast<SingleLayerActor*>(layer)->mandatoryLoadNodeAsynchronous(loadExclusionList);
_loadInLayer = layer;
SystemViewContext* currentcontext = getSystemViewContext(this);
if (_loadInLayer->isInstanceOf(CLASS_EARTHLAYER))
{
currentcontext->_mainViewer->getCamera()->setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
currentcontext->_mainViewer->getCamera()->setNearFarRatio(1e-9);
_root->removeChild(_sceneSky);
}
else
{
currentcontext->_mainViewer->getCamera()->setClearColor(osg::Vec4(0.004f, 0.0902f, 0.1804f, 1.0f));
currentcontext->_mainViewer->getCamera()->setNearFarRatio(1e-5);
if (!_root->containsNode(_sceneSky))
_root->addChild(_sceneSky);
//reset
dynamic_cast<SingleLayerActor*>(_loadInLayer.get())->resetZeroTransform();
ActorList childLayerList;
dynamic_cast<SingleLayerActor*>(_loadInLayer.get())->getAllChildren(childLayerList, CLASS_LAYER, true, false);
for (unsigned int i = 0; i < childLayerList.size(); ++i)
{
dynamic_cast<SingleLayerActor*>(childLayerList.at(i))->resetDefaultTransform();
}
}
osg::ref_ptr<UserEventData> userData = new UserEventData();
userData->_eventObject = _loadInLayer.get();
userData->_eventType = UserEventData::LAYERCHANGED;
currentcontext->_mainViewer->getEventQueue()->userEvent(userData.get());
}
示例3: deleteLayer
void LayersManager::deleteLayer(VirtualDataSceneBase::ActorBase* layerActor, bool deleteChild)
{
osg::Node* layerNode = dynamic_cast<osg::Node*>(layerActor);
if (layerActor->isInstanceOf(CLASS_ENTERPRISELAYER))
{
_root->removeChild(layerNode);
_enterpriseList.erase(std::find(_enterpriseList.begin(), _enterpriseList.end(), layerNode));
}
else
{
VirtualDataSceneKernel::SingleLayerActor* ppLayer = dynamic_cast<VirtualDataSceneKernel::SingleLayerActor*>(layerNode->getParent(0));
if (!deleteChild)
{
ActorList returnValue;
VirtualDataSceneKernel::DeviceGroup* parent = dynamic_cast<VirtualDataSceneKernel::DeviceGroup*>(layerActor);
parent->getAllChildren(returnValue, CLASS_DEVICE);
osg::ref_ptr<osg::Node> everyObj;
for (unsigned int i = 0; i < returnValue.size(); ++i)
{
everyObj = dynamic_cast<osg::Node*>(returnValue.at(i));
parent->removeChild(everyObj);
ppLayer->addChild(everyObj);
}
}
dynamic_cast<VirtualDataSceneKernel::SingleLayerActor*>(layerActor)->mandatoryUnLoadNode();
ppLayer->removeChild(dynamic_cast<osg::Node*>(layerActor));
}
}