History

Merge branch 'master' of https://github.com/highfidelity/hifi into pull_out_menu_mess

Atlante45 committed 11 years ago

Commit 71b565c2 parents 11ea3e4 4c10f6f46 files · +1273 −1125Browse files

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

Unified · Split

interface/src/Application.cpp+6−15
@@ -208,7 +208,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 207 unmodified lines
208208 _justStarted(true),
209209 _physicsEngine(glm::vec3(0.0f)),
210210 _entities(true, this, this),
211− _entityCollisionSystem(),
212211 _entityClipboardRenderer(false, this, this),
213212 _entityClipboard(),
214213 _viewFrustum(),
@@ -1688,17 +1687,16 @@ void Application::init() { · 1473 unmodified lines
16881687 _entities.init();
16891688 _entities.setViewFrustum(getViewFrustum());
16901689
1691− EntityTree* entityTree = _entities.getTree();
1692−
1693− _entityCollisionSystem.init(&_entityEditSender, entityTree, &_avatarManager);
1694−
1695− entityTree->setSimulation(&_entityCollisionSystem);
1690+ EntityTree* tree = _entities.getTree();
1691+ _physicsEngine.setEntityTree(tree);
1692+ tree->setSimulation(&_physicsEngine);
1693+ _physicsEngine.init(&_entityEditSender);
16961694
1697− connect(&_entityCollisionSystem, &EntityCollisionSystem::entityCollisionWithEntity,
1695+ connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity,
16981696 ScriptEngine::getEntityScriptingInterface(), &EntityScriptingInterface::entityCollisionWithEntity);
16991697
17001698 // connect the _entityCollisionSystem to our EntityTreeRenderer since that's what handles running entity scripts
1701− connect(&_entityCollisionSystem, &EntityCollisionSystem::entityCollisionWithEntity,
1699+ connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity,
17021700 &_entities, &EntityTreeRenderer::entityCollisionWithEntity);
17031701
17041702 // connect the _entities (EntityTreeRenderer) to our script engine's EntityScriptingInterface for firing
@@ -1719,10 +1717,6 @@ void Application::init() { · 14 unmodified lines
17191717 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
17201718 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
17211719
1722− EntityTree* tree = _entities.getTree();
1723− _physicsEngine.setEntityTree(tree);
1724− tree->setSimulation(&_physicsEngine);
1725− _physicsEngine.init(&_entityEditSender);
17261720 // make sure our texture cache knows about window size changes
17271721 DependencyManager::get<TextureCache>()->associateWithWidget(glCanvas.data());
17281722
@@ -2044,9 +2038,6 @@ void Application::update(float deltaTime) { · 315 unmodified lines
20442038 // NOTE: the _entities.update() call below will wait for lock
20452039 // and will simulate entity motion (the EntityTree has been given an EntitySimulation).
20462040 _entities.update(); // update the models...
2047− // The _entityCollisionSystem.updateCollisions() call below merely tries for lock,
2048− // and on failure it skips collision detection.
2049− _entityCollisionSystem.updateCollisions(); // collide the entities...
20502041 }
20512042
20522043 {

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