You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constraints act on a subset of bodies. Tracing each of those bodies through its parent along the path towards Ground (G), the first body that is present on all the paths is called the "Ancestor" (A) body for that constraint. A might turn out to be G, but often it is another body.
Currently all constraint calculations are done relative to A. The idea was to minimize roundoff error for small topological loops that are far from G in the tree. When A!=G, this requires computing new Transforms for A and each of the constrained bodies. That is an expensive operation (I've profiled it) and I now think it was not necessary. The code would be simpler and faster if the calculations were simply performed in G.
So the tasks here are
Make Ground the ancestor for all constraints for purposes of calculation.
Eliminate all the dead code associated with A!=G, including the specialized methods in ConstraintImpl and the cache entries holding the A-relative computations.
Continue to determine A for each constraint for purposes of sparse calculations; none of the mobilities between G and A can affect the constraint errors.
Verify speedup.
Test carefully.
This should not require any changes to the Constraint implementations. Although those are written relative to A, they don't know which body that is and should work fine if A==G.
The text was updated successfully, but these errors were encountered:
Constraints act on a subset of bodies. Tracing each of those bodies through its parent along the path towards Ground (G), the first body that is present on all the paths is called the "Ancestor" (A) body for that constraint. A might turn out to be G, but often it is another body.
Currently all constraint calculations are done relative to A. The idea was to minimize roundoff error for small topological loops that are far from G in the tree. When A!=G, this requires computing new Transforms for A and each of the constrained bodies. That is an expensive operation (I've profiled it) and I now think it was not necessary. The code would be simpler and faster if the calculations were simply performed in G.
So the tasks here are
ConstraintImpl
and the cache entries holding the A-relative computations.This should not require any changes to the Constraint implementations. Although those are written relative to A, they don't know which body that is and should work fine if A==G.
The text was updated successfully, but these errors were encountered: