highfidelity/hifi — pull request #3816 by AndrewMeadows (2014-11-18 02:01:19+00:00)
Title: changes to EntityTree simulation state management

This is some work that I started in my Bullet physics engine project when trying to simulate EntityItems in the physics engine. I decided to move it to a non-physics branch and submit it as a prerequisite since the work here is doesn't actually use any physics yet.

In short this is some changes to how the **SimulationState** of an EntityItem is managed.

(1) I've combined the **Moving** and **Changing** states to be just **Moving**.

(2) The EntityItem remembers which SimulationState category it has been put into, but the EntityTree manages all transitions of SimulationStates.

(3) EntityItems that are updated by network packets get funneled into a QSet in EntityTree that gets processed later. Eventually this "changed set" will be used to relay any physics-relevant changes (position, velocity, shape) to the corresponding data structures inside the physics engine.