Universe.Physics.BulletSPlugin.BSAPIXNA.CreatePoint2PointConstraint C# (CSharp) Method

CreatePoint2PointConstraint() public method

public CreatePoint2PointConstraint ( BulletWorld pWorld, BulletBody pBody1, BulletBody pBody2, System.Vector3 ppivotInA, System.Vector3 ppivotInB, bool pdisableCollisionsBetweenLinkedBodies ) : BulletConstraint
pWorld BulletWorld
pBody1 BulletBody
pBody2 BulletBody
ppivotInA System.Vector3
ppivotInB System.Vector3
pdisableCollisionsBetweenLinkedBodies bool
return BulletConstraint
        public override BulletConstraint CreatePoint2PointConstraint(BulletWorld pWorld, BulletBody pBody1,
            BulletBody pBody2,
            Vector3 ppivotInA, Vector3 ppivotInB,
            bool pdisableCollisionsBetweenLinkedBodies)
        {
            Point2PointConstraint constrain = null;
            DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
            RigidBody rb1 = (pBody1 as BulletBodyXNA).rigidBody;
            RigidBody rb2 = (pBody2 as BulletBodyXNA).rigidBody;
            if (rb1 != null && rb2 != null)
            {
                IndexedVector3 pivotInA = new IndexedVector3(ppivotInA.X, ppivotInA.Y, ppivotInA.Z);
                IndexedVector3 pivotInB = new IndexedVector3(ppivotInB.X, ppivotInB.Y, ppivotInB.Z);
                constrain = new Point2PointConstraint(rb1, rb2, ref pivotInA, ref pivotInB);
                world.AddConstraint(constrain, pdisableCollisionsBetweenLinkedBodies);
            }
            return new BulletConstraintXNA(constrain);
        }
BSAPIXNA