Ejemplo n.º 1
0
        public void Scatter(ref Vector3Wide offsetB, ref ContactManifold target)
        {
            var count = Count[0];

            target.SetConvexityAndCount(count, true);
            target.OffsetB.X  = offsetB.X[0];
            target.OffsetB.Y  = offsetB.Y[0];
            target.OffsetB.Z  = offsetB.Z[0];
            target.Offset0.X  = OffsetA0.X[0];
            target.Offset0.Y  = OffsetA0.Y[0];
            target.Offset0.Z  = OffsetA0.Z[0];
            target.Depth0     = Depth0[0];
            target.FeatureId0 = FeatureId0[0];
            if (count > 1)
            {
                target.Offset1.X  = OffsetA1.X[0];
                target.Offset1.Y  = OffsetA1.Y[0];
                target.Offset1.Z  = OffsetA1.Z[0];
                target.Depth1     = Depth1[0];
                target.FeatureId1 = FeatureId1[0];
            }
            target.ConvexNormal.X = Normal.X[0];
            target.ConvexNormal.Y = Normal.Y[0];
            target.ConvexNormal.Z = Normal.Z[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);
 }
Ejemplo n.º 4
0
 public void PrepareManifoldForScatter(out ContactManifold manifold)
 {
     manifold = default;
     manifold.SetConvexityAndCount(1, true);
 }