这篇教程C++ updateObject函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateObject函数的典型用法代码示例。如果您正苦于以下问题:C++ updateObject函数的具体用法?C++ updateObject怎么用?C++ updateObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateObject函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updateObjectvoid Scene::update() { if (player) { updateObject(*player); } for(auto &object : m_objects) updateObject(object);}
开发者ID:Quent42340,项目名称:libegdt,代码行数:7,
示例2: processObjEvent/** * Processes queue events */static void processObjEvent(UAVObjEvent * ev){ UAVObjMetadata metadata; UAVObjUpdateMode updateMode; FlightTelemetryStatsData flightStats; int32_t retries; int32_t success; if (ev->obj == 0) { updateTelemetryStats(); } else if (ev->obj == GCSTelemetryStatsHandle()) { gcsTelemetryStatsUpdated(); } else { // Only process event if connected to GCS or if object FlightTelemetryStats is updated FlightTelemetryStatsGet(&flightStats); // Get object metadata UAVObjGetMetadata(ev->obj, &metadata); updateMode = UAVObjGetTelemetryUpdateMode(&metadata); if (flightStats.Status == FLIGHTTELEMETRYSTATS_STATUS_CONNECTED || ev->obj == FlightTelemetryStatsHandle()) { // Act on event retries = 0; success = -1; if (ev->event == EV_UPDATED || ev->event == EV_UPDATED_MANUAL || ((ev->event == EV_UPDATED_PERIODIC) && (updateMode != UPDATEMODE_THROTTLED))) { // Send update to GCS (with retries) while (retries < MAX_RETRIES && success == -1) { success = UAVTalkSendObject(uavTalkCon, ev->obj, ev->instId, UAVObjGetTelemetryAcked(&metadata), REQ_TIMEOUT_MS); // call blocks until ack is received or timeout ++retries; } // Update stats txRetries += (retries - 1); if (success == -1) { ++txErrors; } } else if (ev->event == EV_UPDATE_REQ) { // Request object update from GCS (with retries) while (retries < MAX_RETRIES && success == -1) { success = UAVTalkSendObjectRequest(uavTalkCon, ev->obj, ev->instId, REQ_TIMEOUT_MS); // call blocks until update is received or timeout ++retries; } // Update stats txRetries += (retries - 1); if (success == -1) { ++txErrors; } } // If this is a metaobject then make necessary telemetry updates if (UAVObjIsMetaobject(ev->obj)) { updateObject(UAVObjGetLinkedObj(ev->obj), EV_NONE); // linked object will be the actual object the metadata are for } } if((updateMode == UPDATEMODE_THROTTLED) && !UAVObjIsMetaobject(ev->obj)) { // If this is UPDATEMODE_THROTTLED, the event mask changes on every event. updateObject(ev->obj, ev->event); } }}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:59,
示例3: DockWidgetObjectWidget::ObjectWidget(const SceneObject& object, QWidget* parent) : DockWidget(object, parent), objectRenderer(Document::document->getSimulation(), object.name.toAscii().constData()), objectGlWidget(0), showSensorsAct(0), showDrawingsAct(0){ connect(Document::document, SIGNAL(updatedSceneGraph()), this, SLOT(updateObject())); connect(Document::document, SIGNAL(restoreLayoutSignal()), this, SLOT(restoreLayout())); connect(Document::document, SIGNAL(writeLayoutSignal()), this, SLOT(writeLayout())); connect(Document::document, SIGNAL(updateViewsSignal()), this, SLOT(updateView())); updateObject();}
开发者ID:alon,项目名称:bhuman2009fork,代码行数:10,
示例4: checkInputvoid LevelOneScreen::update(){ checkInput(); //Update the player and monsters. updateObject(); _camera.setPosition(_level->getCameraPos(_player->getPosition(),_screenSize, _camera.getScale())); _camera.update(); if (_needToDrawGoal) { glm::vec2 centerPos = _player->calculatePositionInGrid(); if (_level->getSymbol((int)centerPos.x, (int)centerPos.y) == '#') { _player->setReachedState(true); _currentState = MasaEngine::ScreenState::CHANGE_NEXT; } } if ((int)_monsters.size() == 0 && !_needToDrawGoal) { _needToDrawGoal = true; MasaEngine::SoundEffect openDoor = _audioEngine.loadSoundEffect("Sound/openDoor.ogg"); openDoor.play(); }}
开发者ID:Fuatnow,项目名称:RunAway,代码行数:26,
示例5: initAnimationvoid IconStorage::insertAutoIcon(QObject *AObject, const QString &AKey, int AIndex, int AAnimate, const QString &AProperty){ IconStorage *oldStorage = FObjectStorage.value(AObject); if (oldStorage!=NULL && oldStorage!=this) oldStorage->removeAutoIcon(AObject); if (AObject!=NULL && !AKey.isEmpty()) { IconUpdateParams *params; if (oldStorage!=this) { params = new IconUpdateParams; FObjectStorage.insert(AObject,this); FUpdateParams.insert(AObject,params); } else { params = FUpdateParams.value(AObject); } params->key = AKey; params->index = AIndex; params->prop = AProperty; params->animate = AAnimate; initAnimation(AObject,params); updateObject(AObject); connect(AObject,SIGNAL(destroyed(QObject *)),SLOT(onObjectDestroyed(QObject *))); } else if (AObject!=NULL) { removeAutoIcon(AObject); }}
开发者ID:ChALkeR,项目名称:vacuum-im,代码行数:32,
示例6: dirvoid gProjectCore::updateObjects(const QString &host,const QString &dbName,const QStringList &selObjects, const gListSQlObjts &,gObjectDBType objType){ QChar separator=QDir::separator(); QDir dir(path+separator+name+separator+host+separator+dbName); dir.cd(getDirNameByObjType(objType)); QStringList objFiles=dir.entryList(QStringList()<<"*.sql",QDir::Files,QDir::Name); objFiles.replaceInStrings(".sql",""); for (int i=0;i<selObjects.count();i++){ QString objName=selObjects.at(i); int index=objFiles.indexOf(objName); if (index>-1){ updateObject(host,dbName,objName,objType); objFiles.removeAt(index); }else{ gConnection *connection=connections.findDBByHostDB(host,dbName); if (!connection) return; QByteArray objText=connection->getObjText(objName,objType); QFile file(dir.path()+"/"+objName+".sql"); if (file.open(QIODevice::WriteOnly)){ file.write(objText); emit sigAddObj(host,dbName,objName,objType); file.close(); } } } for (int i=0;i<objFiles.count();i++){ removeObject(host,dbName,objFiles.at(i),objType); }}
开发者ID:nastvood,项目名称:gammasqlgit,代码行数:34,
示例7: Q_ASSERTStatus Editor::setObject(Object* newObject){ if (newObject == nullptr) { Q_ASSERT(false); return Status::INVALID_ARGUMENT; } if (newObject == mObject.get()) { return Status::SAFE; } clearUndoStack(); mObject.reset(newObject); for (BaseManager* m : mAllManagers) { m->load(mObject.get()); } g_clipboardVectorImage.setObject(newObject); updateObject(); if (mViewManager) { connect(newObject, &Object::layerViewChanged, mViewManager, &ViewManager::viewChanged); } emit objectLoaded(); return Status::OK;}
开发者ID:scribblemaniac,项目名称:pencil,代码行数:34,
示例8: registerObject/** * Register a new object, adds object to local list and connects the queue depending on the object's * telemetry settings. * /param[in] obj Object to connect */static void registerObject(UAVObjHandle obj){ if (UAVObjIsMetaobject(obj)) { /* Only connect change notifications for meta objects. No periodic updates */ UAVObjConnectQueue(obj, priorityQueue, EV_MASK_ALL_UPDATES); return; } else { UAVObjMetadata metadata; UAVObjUpdateMode updateMode; UAVObjGetMetadata(obj, &metadata); updateMode = UAVObjGetTelemetryUpdateMode(&metadata); /* Only create a periodic event for objects that are periodic */ if ((updateMode == UPDATEMODE_PERIODIC) || (updateMode == UPDATEMODE_THROTTLED)) { // Setup object for periodic updates UAVObjEvent ev = { .obj = obj, .instId = UAVOBJ_ALL_INSTANCES, .event = EV_UPDATED_PERIODIC, }; EventPeriodicQueueCreate(&ev, queue, 0); } // Setup object for telemetry updates updateObject(obj, EV_NONE); }
开发者ID:SergDoc,项目名称:TauLabs,代码行数:32,
示例9: updateObjectvoid Object::mergeBoundingBox(const BoundingBox &box){ int x1, y1, x2, y2; if( box.topLeft.getX() < lastImageTopLeftX) { x1 = box.topLeft.getX(); } else { x1 = lastImageTopLeftX; } if( box.topLeft.getY() < lastImageTopLeftY) { y1 = box.topLeft.getY(); } else { y1 = lastImageTopLeftY; } if( (box.topLeft.getX() + box.width) > (lastImageTopLeftX + lastImageWidth)) { x2 = (box.topLeft.getX() + box.width); } else { x2 = (lastImageTopLeftX + lastImageWidth); } if( (box.topLeft.getY() + box.height) > (lastImageTopLeftY + lastImageHeight)) { y2 = (box.topLeft.getY() + box.height); } else { y2 = (lastImageTopLeftY + lastImageHeight); } bool lastSeen = lastImageSeen; updateObject( x1, y1, (x2 - x1), (y2 - y1)); lastImageSeen = lastSeen;}
开发者ID:rsmrafael,项目名称:DarwinWalking-Repository,代码行数:31,
示例10: updateObjectvoid MeshInfo::on_chkDoubleSide_toggled(bool checked){ if (checked) { } updateObject();}
开发者ID:whztt07,项目名称:MagicGameEditor,代码行数:8,
示例11: registerObject/** * Register a new object, adds object to local list and connects the queue depending on the object's * telemetry settings. * /param[in] obj Object to connect */static void registerObject(UAVObjHandle obj){ // Setup object for periodic updates addObject(obj); // Setup object for telemetry updates updateObject(obj);}
开发者ID:nzmichaelh,项目名称:openpilot,代码行数:13,
示例12: addObject/** * Register a new object for periodic updates (if enabled) */void Telemetry::registerObject(UAVObject* obj){ // Setup object for periodic updates addObject(obj); // Setup object for telemetry updates updateObject(obj);}
开发者ID:mcu786,项目名称:my_OpenPilot_mods,代码行数:11,
示例13: updateObjectvoid TweenInfo::on_chkPlayAtStart_toggled(bool checked){ if (checked) { } updateObject();}
开发者ID:whztt07,项目名称:MagicGameEditor,代码行数:8,
示例14: updateObjectvoid MaterialInfo::on_txtAlphaTest_valueChanged(double arg1){ if (arg1 > 0.0) { } updateObject();}
开发者ID:whztt07,项目名称:MagicGameEditor,代码行数:8,
示例15: updateObjectvoid MaterialVar_Matrix::on_txt_3_3_valueChanged(double arg1){ if (arg1) { } updateObject();}
开发者ID:whztt07,项目名称:MagicGameEditor,代码行数:8,
注:本文中的updateObject函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateObjects函数代码示例 C++ updateName函数代码示例 |