public unsafe void ExecuteConvexBatch <TShape, TShapeWide>(ConvexShapeBatch <TShape, TShapeWide> shapeBatch) where TShape : struct, IConvexShape where TShapeWide : struct, IShapeWide <TShape>
        {
            var instanceBundle = default(BoundingBoxInstanceWide <TShape, TShapeWide>);

            if (instanceBundle.Shape.InternalAllocationSize > 0) //TODO: Check to make sure the JIT omits the branch.
            {
                var memory = stackalloc byte[instanceBundle.Shape.InternalAllocationSize];
                instanceBundle.Shape.Initialize(new RawBuffer(memory, instanceBundle.Shape.InternalAllocationSize));
            }
            ref var batch         = ref batches[shapeBatch.TypeId];
Ejemplo n.º 2
0
 public unsafe void ExecuteConvexBatch <TShape, TShapeWide>(ConvexShapeBatch <TShape, TShapeWide> shapeBatch) where TShape : struct, IConvexShape where TShapeWide : struct, IShapeWide <TShape>
 {
     var     instanceBundle = default(BoundingBoxInstanceWide <TShape, TShapeWide>);
     ref var batch          = ref batches[shapeBatch.TypeId];