History

maintain Space proxies for entities

Andrew Meadows committed 8 years ago

Commit e7495d81 parent 76d2e9b13 files · +75 −25Browse files

Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all

Unified · Split

interface/src/Application.cpp+5−13
@@ -4544,8 +4544,6 @@ void Application::init() { · 4543 unmodified lines
4544 _physicsEngine->init();4544 _physicsEngine->init();
4545 4545
4546 EntityTreePointer tree = getEntities()->getTree();4546 EntityTreePointer tree = getEntities()->getTree();
4547 connect(tree.get(), &EntityTree::deletingEntity, this, &Application::deletingEntity, Qt::QueuedConnection);
4548 connect(tree.get(), &EntityTree::addingEntity, this, &Application::addingEntity, Qt::QueuedConnection);
4549 _entitySimulation->init(tree, _physicsEngine, &_entityEditSender);4547 _entitySimulation->init(tree, _physicsEngine, &_entityEditSender);
4550 tree->setSimulation(_entitySimulation);4548 tree->setSimulation(_entitySimulation);
4551 4549
@@ -4879,14 +4877,16 @@ void Application::setKeyboardFocusEntity(const EntityItemID& entityItemID) { · 327 unmodified lines
4879 auto entityId = _keyboardFocusedEntity.get();4877 auto entityId = _keyboardFocusedEntity.get();
4880 if (entities->wantsKeyboardFocus(entityId)) {4878 if (entities->wantsKeyboardFocus(entityId)) {
4881 entities->setProxyWindow(entityId, _window->windowHandle());4879 entities->setProxyWindow(entityId, _window->windowHandle());
4882 auto entity = getEntities()->getEntity(entityId);
4883 if (_keyboardMouseDevice->isActive()) {4880 if (_keyboardMouseDevice->isActive()) {
4884 _keyboardMouseDevice->pluginFocusOutEvent();4881 _keyboardMouseDevice->pluginFocusOutEvent();
4885 }4882 }
4886 _lastAcceptedKeyPress = usecTimestampNow();4883 _lastAcceptedKeyPress = usecTimestampNow();
4887 4884
4888 setKeyboardFocusHighlight(entity->getWorldPosition(), entity->getWorldOrientation(),4885 auto entity = getEntities()->getEntity(entityId);
4889 entity->getScaledDimensions() * FOCUS_HIGHLIGHT_EXPANSION_FACTOR);4886 if (entity) {
4887 setKeyboardFocusHighlight(entity->getWorldPosition(), entity->getWorldOrientation(),
4888 entity->getScaledDimensions() * FOCUS_HIGHLIGHT_EXPANSION_FACTOR);
4889 }
4890 }4890 }
4891 }4891 }
4892 }4892 }
@@ -7675,12 +7675,4 @@ void Application::saveNextPhysicsStats(QString filename) { · 2782 unmodified lines
7675 _physicsEngine->saveNextPhysicsStats(filename);7675 _physicsEngine->saveNextPhysicsStats(filename);
7676}7676}
7677 7677
7678void Application::addingEntity(const EntityItemID& entityID) {
7679 // TODO: Andrew to implement this
7680}
7681
7682void Application::deletingEntity(const EntityItemID& entityID) {
7683 // TODO: Andrew to implement this
7684}
7685
7686#include "Application.moc"7678#include "Application.moc"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t