Optimizations (#161)
- cache body sim indices and split out fat aabb - deferred restitution - the manifold point normal velocity is only computed for restitution or hit events, otherwise it is zero
This commit is contained in:
parent
f555ee4208
commit
9e5a4cde86
49 changed files with 3395 additions and 864 deletions
|
|
@ -294,3 +294,19 @@ struct CastClosestContext
|
|||
|
||||
float CastClosestCallback( b3ShapeId shapeId, b3Pos point, b3Vec3 normal, float fraction, uint64_t materialId, int triangleIndex,
|
||||
int childIndex, void* context );
|
||||
|
||||
struct MechanicalEnergy
|
||||
{
|
||||
float Total() const
|
||||
{
|
||||
return linear + angular + potential;
|
||||
}
|
||||
|
||||
float linear;
|
||||
float angular;
|
||||
float potential;
|
||||
};
|
||||
|
||||
// Kinetic and gravitational potential energy summed over the bodies. Restitution samples
|
||||
// use the total as the invariant that may only decrease.
|
||||
MechanicalEnergy MeasureEnergy( b3WorldId worldId, const b3BodyId* bodyIds, int count );
|
||||
|
|
|
|||
Loading…
Reference in a new issue