public void Initialize(BufferPool pool, int substepCapacity, ref CollidablePair pair, float speculativeMargin)
 {
     Manifolds.Initialize(pool, substepCapacity);
     Pair = pair;
     SpeculativeMargin = speculativeMargin;
     ManifoldsReported = 0;
 }
 public void Initialize(ref CollidablePair pair, float speculativeMargin)
 {
     Pair = pair;
     SpeculativeMargin = speculativeMargin;
     ManifoldsReported = 0;
     LinearManifold.SetConvexityAndCount(2, false);
 }
 public void Initialize(BufferPool pool, int substepCapacity, ref CollidablePair pair, float speculativeMargin)
 {
     SubstepManifolds.Initialize(pool, substepCapacity);
     Pair = pair;
     ManifoldsReported = 0;
     SpeculativeMargin = speculativeMargin;
     LinearManifold.SetConvexityAndCount(2, false);
 }
Example #4
0
        public PairCacheIndex Add <TCollision, TConstraint>(ref CollidablePair pair, ref TCollision collisionCache, ref TConstraint constraintCache, int manifoldTypeAsConstraintType)
            where TCollision : IPairCacheEntry where TConstraint : IPairCacheEntry
        {
            PendingAdd pendingAdd;

            WorkerCacheAdd(ref collisionCache, ref constraintCache, manifoldTypeAsConstraintType, out pendingAdd.Pointers);
            pendingAdd.Pair = pair;
            PendingAdds.Add(ref pendingAdd, pool.SpecializeFor <PendingAdd>());
            return(pendingAdd.Pointers.ConstraintCache);
        }
 public unsafe void AddConstraint <TBodyHandles, TDescription, TContactImpulses>(int manifoldConstraintType,
                                                                                 ref CollidablePair pair, PairCacheIndex constraintCacheIndex, TBodyHandles bodyHandles, ref TDescription constraintDescription, ref TContactImpulses impulses)
     where TDescription : unmanaged, IConstraintDescription <TDescription>
 {
     ref var cache      = ref pendingConstraintsByType[manifoldConstraintType];
Example #6
0
 public void Initialize(ref CollidablePair pair, in Vector3 relativeLinearVelocity, in Vector3 angularVelocityA, in Vector3 angularVelocityB, float t)
Example #7
0
 public void Initialize(ref CollidablePair pair)
 {
     Pair = pair;
 }
 public int AddSubstepsWithLinear(ref CollidablePair pair, int substepCount, float speculativeMargin)
 {
     substepWithLinear.Allocate(pool, out var index).Initialize(pool, substepCount, ref pair, speculativeMargin);
     return(index);
 }
 public int AddLinear(ref CollidablePair pair, float speculativeMargin)
 {
     linear.Allocate(pool, out var index).Initialize(ref pair, speculativeMargin);
     return(index);
 }
 public ContinuationIndex AddDiscrete(ref CollidablePair pair, float speculativeMargin)
 {
     discrete.Allocate(pool, out var index).Initialize(ref pair, speculativeMargin);
     return(new ContinuationIndex((int)ConstraintGeneratorType.Discrete, index, 0));
 }
 public void Initialize(ref CollidablePair pair, float speculativeMargin)
 {
     Pair = pair;
     SpeculativeMargin = speculativeMargin;
 }
 public unsafe void Configure(CollidablePair parent, int childA, int childB, ContactManifold *manifold)
 {
     narrowPhase.Callbacks.ConfigureContactManifold(workerIndex, parent, childA, childB, manifold);
 }
 public bool AllowCollisionTesting(CollidablePair parent, int childA, int childB)
 {
     return(narrowPhase.Callbacks.AllowContactGeneration(workerIndex, parent, childA, childB));
 }