The Model pendingChanges.updateItem() lambda now directly calls into StaticallyNestable. This is late enough
in the update loop to have the most up-to-date camera transform used for rendering.
* When the GeometryReader has the last ref to the GeometryResource ptr
It needs to hold on to the reference until invokeMethod is completed.
Otherwise, invokeMethod will call a method on a deleted object, leading
to memory corruption or crashes.
* When the Model URL is changed, the clusterMatrices are invalided and the
RenderItemsSets are cleared. However, there still might be renderItems in
the scene pending changes list that might refer to those RenderItems and their
clusterMatrices. We need to guard against this access to prevent reading from
memory that was previously freed.
Both of these issues were uncovered using the [avatar-thrasher](https://gist.github.com/hyperlogic/d82a61d141df43d576428501a82c5ee6) test script.
* Renamed enqueueLocationChange to updateRenderItems
* Call updateRenderItems when models are added to the scene.
This will fix entity render bounds being incorrect when they are first added to the scene,
then later being correct after a position update.
* Renamed getMeshPartBound to getRenderableMeshBound.
* Avatar now uses getRenderableMeshBound() to do boundingRadius vs frustum check.
* Model::getRenderableMeshBound now returns a more accurate bound, because it is the same one used for rendering.
This will fix avatar freezing, when they are in the corner of your frustum.
This was due to matrices not being updated because the avatar had to a small bounding sphere.
* Use all cluster matrices to compute bound for skinned mesh.
This is far less expensive then doing per-vertex work, but it's not free, for avatars especially.
* Remove skinnedMeshBound, compute it instead.
* Compute clusterMatrices in render update, because we need them to update bounds.
* bug fix in AABox::operator+=
* added AABox::emiggen
* Avatar now has a default bound for it's skinned mesh.
* WIP: AABox tests; NEED MORE
* Model: split collision and model mesh render items.
Because ModelMeshRenderItems need special handling to update bounds for animated joints.
* Model: dynamically update the bound for rigidly bound animated meshes
* Rig: added access to geometryToRigTransform
* RenderableModelEntityItem: try to update bounds for skinned mesh to be the entity dimentions (this doesn't seem to be working)
* Geometry.cpp: removed unused bounds parameter in evalPartBounds
* ModelMeshPartPayload: bounds updating
* non-animated: use existing _localBound
* rigid bound mesh: use _localBound transformed by clusterMatrix joint transform
* fully skinned mesh: use _skinnedMeshBound provided by the application.