public OverlapWorker(int workerIndex, BufferPool pool, NarrowPhase <TCallbacks> narrowPhase) { Batcher = new CollisionBatcher <CollisionCallbacks>(pool, narrowPhase.Shapes, narrowPhase.CollisionTaskRegistry, narrowPhase.timestepDuration, new CollisionCallbacks(workerIndex, pool, narrowPhase)); PendingConstraints = new PendingConstraintAddCache(pool); QuickList <int, Buffer <int> > .Create(pool.SpecializeFor <int>(), 16, out PendingSetAwakenings); }
public unsafe void OnChildCompleted <TCallbacks>(ref PairContinuation report, ref ConvexContactManifold manifold, ref CollisionBatcher <TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks { Inner.OnChildCompleted(ref report, ref manifold, ref batcher); }
public void OnChildCompletedEmpty <TCallbacks>(ref PairContinuation report, ref CollisionBatcher <TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks { Inner.OnChildCompletedEmpty(ref report, ref batcher); }
//Note that we leave the details of input and output of a task's execution to be undefined. //A task can reach into the batcher and create new entries or trigger continuations as required. /// <summary> /// Executes the task on the given input. /// </summary> /// <typeparam name="TCallbacks">Type of the callbacks used to handle results of collision tasks.</typeparam> /// <param name="batcher">Batcher responsible for the invocation.</param> /// <param name="batch">Batch of pairs to test.</param> /// <param name="continuations">Continuations to invoke upon completion of a top level pair.</param> /// <param name="filters">Filters to use to influence execution of the collision tasks.</param> public abstract void ExecuteBatch <TCallbacks>(ref UntypedList batch, ref CollisionBatcher <TCallbacks> batcher) where TCallbacks : struct, ICollisionCallbacks;