public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
        {
            ConvexConvexAlgorithm cca = BulletGlobals.ConvexConvexAlgorithmPool.Get();

            cca.Initialize(ci.GetManifold(), ci, body0, body1, m_simplexSolver, m_pdSolver, m_numPerturbationIterations, m_minimumPointsPerturbationThreshold);
            return(cca);
        }
        public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
        {
            SphereTriangleCollisionAlgorithm algo = BulletGlobals.SphereTriangleCollisionAlgorithmPool.Get();

            algo.Initialize(ci.GetManifold(), ci, body0, body1, m_swapped);
            return(algo);
        }
 public virtual void Initialize(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1, bool isSwapped)
 {
     base.Initialize(ci, body0, body1);
     m_isSwapped = isSwapped;
     m_sharedManifold = ci.GetManifold();
     m_ownsManifold = false;
     CollisionObject colObj = m_isSwapped ? body1 : body0;
     Debug.Assert(colObj.GetCollisionShape().IsCompound());
     CompoundShape compoundShape = (CompoundShape)(colObj.GetCollisionShape());
     m_compoundShapeRevision = compoundShape.GetUpdateRevision();
     PreallocateChildAlgorithms(body0, body1);
 }
Exemplo n.º 4
0
        public virtual void Initialize(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1, bool isSwapped)
        {
            base.Initialize(ci, body0, body1);
            m_isSwapped      = isSwapped;
            m_sharedManifold = ci.GetManifold();
            m_ownsManifold   = false;
            CollisionObject colObj = m_isSwapped ? body1 : body0;

            Debug.Assert(colObj.GetCollisionShape().IsCompound());
            CompoundShape compoundShape = (CompoundShape)(colObj.GetCollisionShape());

            m_compoundShapeRevision = compoundShape.GetUpdateRevision();
            PreallocateChildAlgorithms(body0, body1);
        }
 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
 {
     ConvexConvexAlgorithm cca = BulletGlobals.ConvexConvexAlgorithmPool.Get();
     cca.Initialize(ci.GetManifold(), ci, body0, body1, m_simplexSolver, m_pdSolver, m_numPerturbationIterations, m_minimumPointsPerturbationThreshold);
     return cca;
 }
 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
 {
     SphereTriangleCollisionAlgorithm algo = BulletGlobals.SphereTriangleCollisionAlgorithmPool.Get();
     algo.Initialize(ci.GetManifold(), ci, body0, body1, m_swapped);
     return algo;
 }
Exemplo n.º 7
0
 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
 {
     return(new Convex2dConvex2dAlgorithm(ci.GetManifold(), ci, body0, body1, m_simplexSolver, m_pdSolver, m_numPerturbationIterations, m_minimumPointsPerturbationThreshold));
 }
 public override CollisionAlgorithm CreateCollisionAlgorithm(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
 {
     return new Convex2dConvex2dAlgorithm(ci.GetManifold(), ci, body0, body1, m_simplexSolver, m_pdSolver, m_numPerturbationIterations, m_minimumPointsPerturbationThreshold);
 }