public static void Test()
        {
            var pool     = new BufferPool();
            var registry = new CollisionTaskRegistry();
            var task     = new SpherePairCollisionTask();

            registry.Register(task);
            var continuations = new ContinuationsTest();
            var filters       = new SubtaskFiltersTest();
            var sphere        = new Sphere(1);
            var poseA         = new RigidPose {
                Position = new Vector3(0, 0, 0), Orientation = BepuUtilities.Quaternion.Identity
            };
            var poseB = new RigidPose {
                Position = new Vector3(0, 1, 0), Orientation = BepuUtilities.Quaternion.Identity
            };
            Action <int> action = iterationCount =>
            {
                var batcher = new StreamingBatcher(pool, registry);
                for (int i = 0; i < iterationCount; ++i)
                {
                    batcher.Add(ref sphere, ref sphere, ref poseA, ref poseB, new ContinuationIndex(), ref continuations, ref filters);
                    batcher.Add(ref sphere, ref sphere, ref poseA, ref poseB, new ContinuationIndex(), ref continuations, ref filters);
                    batcher.Add(ref sphere, ref sphere, ref poseA, ref poseB, new ContinuationIndex(), ref continuations, ref filters);
                    batcher.Add(ref sphere, ref sphere, ref poseA, ref poseB, new ContinuationIndex(), ref continuations, ref filters);
                }
                batcher.Flush(ref continuations, ref filters);
            };
            var time0 = Test(action, 1 << 25);

            Console.WriteLine($"Completed count: {continuations.Count}, time (ms): {1e3 * time0}");
            Console.ReadKey();
        }
Esempio n. 2
0
        /// <summary>
        /// Registers the set of shapes constraints that are packaged in the engine.
        /// </summary>
        public static void Register(Solver solver, out CollisionTaskRegistry defaultTaskRegistry)
        {
            solver.Register <BallSocket>();
            solver.Register <Contact1OneBody>();
            solver.Register <Contact1>();
            solver.Register <Contact4>();

            defaultTaskRegistry = new CollisionTaskRegistry();
            defaultTaskRegistry.Register(new SpherePairCollisionTask());
        }
        public static void Test()
        {
            var pool     = new BufferPool();
            var registry = new CollisionTaskRegistry();

            registry.Register(new SpherePairCollisionTask());
            registry.Register(new SphereCapsuleCollisionTask());
            registry.Register(new SphereBoxCollisionTask());
            registry.Register(new CapsulePairCollisionTask());
            registry.Register(new CapsuleBoxCollisionTask());
            registry.Register(new BoxPairCollisionTask());
            var sphere  = new Sphere(1);
            var capsule = new Capsule(0.5f, 1f);
            var box     = new Box(1f, 1f, 1f);
            var poseA   = new RigidPose {
                Position = new Vector3(0, 0, 0), Orientation = BepuUtilities.Quaternion.Identity
            };
            var poseB = new RigidPose {
                Position = new Vector3(0, 1, 0), Orientation = BepuUtilities.Quaternion.Identity
            };

            Test(ref sphere, ref sphere, ref poseA, ref poseB, pool, registry, 1 << 25);
            Test(ref sphere, ref capsule, ref poseA, ref poseB, pool, registry, 1 << 25);
            Test(ref sphere, ref box, ref poseA, ref poseB, pool, registry, 1 << 25);
            Test(ref capsule, ref capsule, ref poseA, ref poseB, pool, registry, 1 << 25);
            Test(ref capsule, ref box, ref poseA, ref poseB, pool, registry, 1 << 25);
            Test(ref box, ref box, ref poseA, ref poseB, pool, registry, 1 << 25);
            Console.ReadKey();
        }
Esempio n. 4
0
        /// <summary>
        /// Creates a task registry containing the default collision pair types.
        /// </summary>
        public static CollisionTaskRegistry CreateDefaultCollisionTaskRegistry()
        {
            var defaultTaskRegistry = new CollisionTaskRegistry();

            defaultTaskRegistry.Register(new SpherePairCollisionTask());
            defaultTaskRegistry.Register(new SphereCapsuleCollisionTask());
            defaultTaskRegistry.Register(new SphereBoxCollisionTask());
            defaultTaskRegistry.Register(new CapsulePairCollisionTask());
            defaultTaskRegistry.Register(new CapsuleBoxCollisionTask());
            defaultTaskRegistry.Register(new BoxPairCollisionTask());
            return(defaultTaskRegistry);
        }
Esempio n. 5
0
        /// <summary>
        /// Creates a task registry containing the default collision pair types.
        /// </summary>
        public static CollisionTaskRegistry CreateDefaultCollisionTaskRegistry()
        {
            var defaultTaskRegistry = new CollisionTaskRegistry();

            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Sphere, SphereWide, SpherePair, SpherePairWide, Convex1ContactManifoldWide, SpherePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Capsule, CapsuleWide, SphereIncludingPair, SphereIncludingPairWide <Capsule, CapsuleWide>, Convex1ContactManifoldWide, SphereCapsuleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Box, BoxWide, SphereIncludingPair, SphereIncludingPairWide <Box, BoxWide>, Convex1ContactManifoldWide, SphereBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Triangle, TriangleWide, SphereIncludingPair, SphereIncludingPairWide <Triangle, TriangleWide>, Convex1ContactManifoldWide, SphereTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Cylinder, CylinderWide, SphereIncludingPair, SphereIncludingPairWide <Cylinder, CylinderWide>, Convex1ContactManifoldWide, SphereCylinderTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, ConvexHull, ConvexHullWide, SphereIncludingPair, SphereIncludingPairWide <ConvexHull, ConvexHullWide>, Convex1ContactManifoldWide, SphereConvexHullTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere, Compound, ConvexCompoundOverlapFinder <Sphere, SphereWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere, BigCompound, ConvexCompoundOverlapFinder <Sphere, SphereWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere, Mesh, ConvexCompoundOverlapFinder <Sphere, SphereWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Capsule, CapsuleWide, FliplessPair, FliplessPairWide <Capsule, CapsuleWide>, Convex2ContactManifoldWide, CapsulePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Box, BoxWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Box, BoxWide>, Convex2ContactManifoldWide, CapsuleBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Triangle, TriangleWide>, Convex2ContactManifoldWide, CapsuleTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Cylinder, CylinderWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Cylinder, CylinderWide>, Convex2ContactManifoldWide, CapsuleCylinderTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, ConvexHull, ConvexHullWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, ConvexHull, ConvexHullWide>, Convex2ContactManifoldWide, CapsuleConvexHullTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule, Compound, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule, BigCompound, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule, Mesh, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Box, BoxWide, FliplessPair, FliplessPairWide <Box, BoxWide>, Convex4ContactManifoldWide, BoxPairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Box, BoxWide, Triangle, TriangleWide>, Convex4ContactManifoldWide, BoxTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Cylinder, CylinderWide, CollisionPair, ConvexPairWide <Box, BoxWide, Cylinder, CylinderWide>, Convex4ContactManifoldWide, BoxCylinderTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, ConvexHull, ConvexHullWide, CollisionPair, ConvexPairWide <Box, BoxWide, ConvexHull, ConvexHullWide>, Convex4ContactManifoldWide, BoxConvexHullTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box, Compound, ConvexCompoundOverlapFinder <Box, BoxWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box, BigCompound, ConvexCompoundOverlapFinder <Box, BoxWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box, Mesh, ConvexCompoundOverlapFinder <Box, BoxWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Triangle, TriangleWide, Triangle, TriangleWide, FliplessPair, FliplessPairWide <Triangle, TriangleWide>, Convex4ContactManifoldWide, TrianglePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Triangle, TriangleWide, Cylinder, CylinderWide, CollisionPair, ConvexPairWide <Triangle, TriangleWide, Cylinder, CylinderWide>, Convex4ContactManifoldWide, TriangleCylinderTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Triangle, TriangleWide, ConvexHull, ConvexHullWide, CollisionPair, ConvexPairWide <Triangle, TriangleWide, ConvexHull, ConvexHullWide>, Convex4ContactManifoldWide, TriangleConvexHullTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle, Compound, ConvexCompoundOverlapFinder <Triangle, TriangleWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle, BigCompound, ConvexCompoundOverlapFinder <Triangle, TriangleWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle, Mesh, ConvexCompoundOverlapFinder <Triangle, TriangleWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Cylinder, CylinderWide, Cylinder, CylinderWide, FliplessPair, FliplessPairWide <Cylinder, CylinderWide>, Convex4ContactManifoldWide, CylinderPairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Cylinder, CylinderWide, ConvexHull, ConvexHullWide, CollisionPair, ConvexPairWide <Cylinder, CylinderWide, ConvexHull, ConvexHullWide>, Convex4ContactManifoldWide, CylinderConvexHullTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Cylinder, Compound, ConvexCompoundOverlapFinder <Cylinder, CylinderWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Cylinder, BigCompound, ConvexCompoundOverlapFinder <Cylinder, CylinderWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Cylinder, Mesh, ConvexCompoundOverlapFinder <Cylinder, CylinderWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new ConvexCollisionTask <ConvexHull, ConvexHullWide, ConvexHull, ConvexHullWide, FliplessPair, FliplessPairWide <ConvexHull, ConvexHullWide>, Convex4ContactManifoldWide, ConvexHullPairTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <ConvexHull, Compound, ConvexCompoundOverlapFinder <ConvexHull, ConvexHullWide, Compound>, ConvexCompoundContinuations <Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <ConvexHull, BigCompound, ConvexCompoundOverlapFinder <ConvexHull, ConvexHullWide, BigCompound>, ConvexCompoundContinuations <BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <ConvexHull, Mesh, ConvexCompoundOverlapFinder <ConvexHull, ConvexHullWide, Mesh>, ConvexMeshContinuations <Mesh>, MeshReduction>());

            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Compound, Compound, CompoundPairOverlapFinder <Compound, Compound>, CompoundPairContinuations <Compound, Compound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Compound, BigCompound, CompoundPairOverlapFinder <Compound, BigCompound>, CompoundPairContinuations <Compound, BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Compound, Mesh, CompoundPairOverlapFinder <Compound, Mesh>, CompoundMeshContinuations <Compound, Mesh>, CompoundMeshReduction>());

            defaultTaskRegistry.Register(new CompoundPairCollisionTask <BigCompound, BigCompound, CompoundPairOverlapFinder <BigCompound, BigCompound>, CompoundPairContinuations <BigCompound, BigCompound>, NonconvexReduction>());
            defaultTaskRegistry.Register(new CompoundPairCollisionTask <BigCompound, Mesh, CompoundPairOverlapFinder <BigCompound, Mesh>, CompoundMeshContinuations <BigCompound, Mesh>, CompoundMeshReduction>());

            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Mesh, Mesh, MeshPairOverlapFinder <Mesh, Mesh>, MeshPairContinuations <Mesh, Mesh>, CompoundMeshReduction>());

            return(defaultTaskRegistry);
        }
Esempio n. 6
0
        /// <summary>
        /// Creates a task registry containing the default collision pair types.
        /// </summary>
        public static CollisionTaskRegistry CreateDefaultCollisionTaskRegistry()
        {
            var defaultTaskRegistry = new CollisionTaskRegistry();

            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Sphere, SphereWide, SpherePair, SpherePairWide, Convex1ContactManifoldWide, SpherePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Capsule, CapsuleWide, SphereIncludingPair, SphereIncludingPairWide <Capsule, CapsuleWide>, Convex1ContactManifoldWide, SphereCapsuleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Box, BoxWide, SphereIncludingPair, SphereIncludingPairWide <Box, BoxWide>, Convex1ContactManifoldWide, SphereBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Triangle, TriangleWide, SphereIncludingPair, SphereIncludingPairWide <Triangle, TriangleWide>, Convex1ContactManifoldWide, SphereTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere>());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Sphere, SphereWide, Mesh>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Capsule, CapsuleWide, FliplessPair, FliplessPairWide <Capsule, CapsuleWide>, Convex2ContactManifoldWide, CapsulePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Box, BoxWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Box, BoxWide>, Convex2ContactManifoldWide, CapsuleBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Triangle, TriangleWide>, Convex2ContactManifoldWide, CapsuleTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule>());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Capsule, CapsuleWide, Mesh>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Box, BoxWide, FliplessPair, FliplessPairWide <Box, BoxWide>, Convex4ContactManifoldWide, BoxPairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Box, BoxWide, Triangle, TriangleWide>, Convex4ContactManifoldWide, BoxTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box>());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Box, BoxWide, Mesh>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Triangle, TriangleWide, Triangle, TriangleWide, FliplessPair, FliplessPairWide <Triangle, TriangleWide>, Convex4ContactManifoldWide, TrianglePairTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle>());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Triangle, TriangleWide, Mesh>());
            defaultTaskRegistry.Register(new CompoundPairCollisionTask());
            return(defaultTaskRegistry);
        }
Esempio n. 7
0
        /// <summary>
        /// Creates a task registry containing the default collision pair types.
        /// </summary>
        public static CollisionTaskRegistry CreateDefaultCollisionTaskRegistry()
        {
            var defaultTaskRegistry = new CollisionTaskRegistry();

            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Sphere, SphereWide, SpherePair, SpherePairWide, Convex1ContactManifoldWide, SpherePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Capsule, CapsuleWide, SphereIncludingPair, SphereIncludingPairWide <Capsule, CapsuleWide>, Convex1ContactManifoldWide, SphereCapsuleTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Box, BoxWide, SphereIncludingPair, SphereIncludingPairWide <Box, BoxWide>, Convex1ContactManifoldWide, SphereBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Sphere, SphereWide, Triangle, TriangleWide, SphereIncludingPair, SphereIncludingPairWide <Triangle, TriangleWide>, Convex1ContactManifoldWide, SphereTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere, Compound, ConvexCompoundOverlapFinder <Sphere, SphereWide, Compound> >());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Sphere, BigCompound, ConvexCompoundOverlapFinder <Sphere, SphereWide, BigCompound> >());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Sphere, Mesh, ConvexCompoundOverlapFinder <Sphere, SphereWide, Mesh> >());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Capsule, CapsuleWide, FliplessPair, FliplessPairWide <Capsule, CapsuleWide>, Convex2ContactManifoldWide, CapsulePairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Box, BoxWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Box, BoxWide>, Convex2ContactManifoldWide, CapsuleBoxTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Capsule, CapsuleWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Capsule, CapsuleWide, Triangle, TriangleWide>, Convex2ContactManifoldWide, CapsuleTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule, Compound, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, Compound> >());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Capsule, BigCompound, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, BigCompound> >());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Capsule, Mesh, ConvexCompoundOverlapFinder <Capsule, CapsuleWide, Mesh> >());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Box, BoxWide, FliplessPair, FliplessPairWide <Box, BoxWide>, Convex4ContactManifoldWide, BoxPairTester>());
            defaultTaskRegistry.Register(new ConvexCollisionTask <Box, BoxWide, Triangle, TriangleWide, CollisionPair, ConvexPairWide <Box, BoxWide, Triangle, TriangleWide>, Convex4ContactManifoldWide, BoxTriangleTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box, Compound, ConvexCompoundOverlapFinder <Box, BoxWide, Compound> >());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Box, BigCompound, ConvexCompoundOverlapFinder <Box, BoxWide, BigCompound> >());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Box, Mesh, ConvexCompoundOverlapFinder <Box, BoxWide, Mesh> >());

            defaultTaskRegistry.Register(new ConvexCollisionTask <Triangle, TriangleWide, Triangle, TriangleWide, FliplessPair, FliplessPairWide <Triangle, TriangleWide>, Convex4ContactManifoldWide, TrianglePairTester>());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle, Compound, ConvexCompoundOverlapFinder <Triangle, TriangleWide, Compound> >());
            defaultTaskRegistry.Register(new ConvexCompoundCollisionTask <Triangle, BigCompound, ConvexCompoundOverlapFinder <Triangle, TriangleWide, BigCompound> >());
            defaultTaskRegistry.Register(new ConvexMeshCollisionTask <Triangle, Mesh, ConvexCompoundOverlapFinder <Triangle, TriangleWide, Mesh> >());

            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Compound, Compound, CompoundPairOverlapFinder <Compound, Compound> >());
            defaultTaskRegistry.Register(new CompoundPairCollisionTask <Compound, BigCompound, CompoundPairOverlapFinder <Compound, BigCompound> >());
            defaultTaskRegistry.Register(new CompoundMeshCollisionTask <Compound, Mesh, CompoundPairOverlapFinder <Compound, Mesh> >());

            defaultTaskRegistry.Register(new CompoundPairCollisionTask <BigCompound, BigCompound, CompoundPairOverlapFinder <BigCompound, BigCompound> >());
            defaultTaskRegistry.Register(new CompoundMeshCollisionTask <BigCompound, Mesh, CompoundPairOverlapFinder <BigCompound, Mesh> >());

            //TODO: No mesh-mesh at the moment.
            return(defaultTaskRegistry);
        }