webcaetano / quickb2

Automatically exported from code.google.com/p/quickb2
0 stars 0 forks source link

Cache potentially performance intensive property getters like centerOfMass and bounding representations. #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
For now, if a user wants to repeatedly access something like centerOfMass for a 
really complicated qb2Group, the center of mass is recalculated for every call, 
when it could be cached and just invalidated the next step.

The workaround for now is to store the centerOfMass (or bounding rep) locally.  
This is best practice anyway due to function call overhead.

Original issue reported on code.google.com by doug...@gmail.com on 29 Nov 2010 at 6:30