Skip to content
Permalink
Browse files

Fixed pose integrator regression in empty simulations.

  • Loading branch information...
RossNordby committed Feb 21, 2019
1 parent e6286d1 commit 18b43f8a90d3ad05a8bc83bffee774b17caafd1a
Showing with 3 additions and 3 deletions.
  1. +3 −3 BepuPhysics/PoseIntegrator.cs
@@ -529,7 +529,7 @@ void PrepareForMultithreadedExecution(float dt, int workerCount)
public void IntegrateBodiesAndUpdateBoundingBoxes(float dt, BufferPool pool, IThreadDispatcher threadDispatcher = null)
{
//Users of this codepath are expecting all integration related work to be done at once, so we need to update inertias.
bodies.EnsureInertiasCapacity(bodies.ActiveSet.Count);
bodies.EnsureInertiasCapacity(Math.Max(1, bodies.ActiveSet.Count));

var workerCount = threadDispatcher == null ? 1 : threadDispatcher.ThreadCount;

@@ -582,7 +582,7 @@ public void PredictBoundingBoxes(float dt, BufferPool pool, IThreadDispatcher th

public void IntegrateVelocitiesBoundsAndInertias(float dt, BufferPool pool, IThreadDispatcher threadDispatcher = null)
{
bodies.EnsureInertiasCapacity(bodies.ActiveSet.Count);
bodies.EnsureInertiasCapacity(Math.Max(1, bodies.ActiveSet.Count));

var workerCount = threadDispatcher == null ? 1 : threadDispatcher.ThreadCount;

@@ -605,7 +605,7 @@ public void IntegrateVelocitiesBoundsAndInertias(float dt, BufferPool pool, IThr
public void IntegrateVelocitiesAndUpdateInertias(float dt, BufferPool pool, IThreadDispatcher threadDispatcher = null)
{
//Isolated velocity integration is used by substeppers that also expect an inertia update.
bodies.EnsureInertiasCapacity(bodies.ActiveSet.Count);
bodies.EnsureInertiasCapacity(Math.Max(1, bodies.ActiveSet.Count));

var workerCount = threadDispatcher == null ? 1 : threadDispatcher.ThreadCount;

0 comments on commit 18b43f8

Please sign in to comment.
You can’t perform that action at this time.