bool PhysicsManager::doUpdate(double dt)
{
	// Add all components that came in before the last update
	processComponents();

	processBehaviors(dt);

	auto state = std::make_shared<PhysicsManagerState>();
	std::list<std::shared_ptr<PhysicsManagerState>> stateList(1, state);
	state->setRepresentations(m_representations);
	state->setCollisionRepresentations(m_collisionRepresentations);
	state->setConstraintComponents(m_constraintComponents);

	{
		boost::mutex::scoped_lock lock(m_excludedCollisionPairMutex);
		state->setExcludedCollisionPairs(m_excludedCollisionPairs);
	}

	for (const auto& computation : m_computations)
	{
		stateList.push_back(computation->update(dt, stateList.back()));
	}

	m_finalState.set(*(stateList.back()));

	return true;
}
main()
{
	for(;;)
	{
		stateWait();
		stateList();
		stateListPost();
		stateStar();
		stateStarPost();
		Store "Yes" or "No" to matchKey;
		stateMatch(matchKey);
	}
}