highfidelity/hifi — pull request #3335 by ZappoMan (2014-09-02 06:06:55+00:00)
Title: Model Server to Entity Server Refactoring

This is a massive PR I realize. I'll be adding notes throughout to help whoever reviews it.

Big changes:
* Models replaced by Entities - naming, classes, etc.
* Entities have all the features that models had, but also support some features of particles (like velocity, gravity, damping, etc)
* ModelItems used to be stored in the element as vectors of ModelItem instances, this has been switched to being heap allocated EntityItem derived class instances, and the tree elements now contain lists of pointers to those heap allocated items. This optimizes our ability to move them around easily when being edited or animated.
* There are now 3 types of entities, more to come, the three types are: Box, Sphere, and Model.
* The old 32bit server assigned IDs have been replaced by server assigned UUIDs - this fixes several collision bugs in the old code.
* All the editing APIs (add, update, delete, getProperties, etc) have been updated to use faster recursion operators and better strategies for minimal traversal of the tree. - This improved large tree performance significantly (up to 20,000x improvement).
* Entities can be accessed by ID through a hash instead of searching the tree... another big performance improvement.
* Delete entity is now a true message/command and no longer uses the goofy "should die" property.
* Some renaming of "node" in trees to be "element" so as to stick with our naming conventions.
* cleaned up some dead code in the voxel system