Setup() private method

private Setup ( ConvexContactManifoldConstraint contactManifoldConstraint ) : void
contactManifoldConstraint ConvexContactManifoldConstraint
return void
Exemplo n.º 1
0
        ///<summary>
        /// Adds a contact to be managed by the constraint.
        ///</summary>
        ///<param name="contact">Contact to add.</param>
        public override void AddContact(Contact contact)
        {
            var penetrationConstraint = penetrationConstraintPool.Pop();

            penetrationConstraint.Setup(this, contact);
            penetrationConstraints.Add(penetrationConstraint);
            if (penetrationConstraints.count == 1)
            {
                //This is the first contact.  All constraints need to become active.
                twistFriction.Setup(this);
                slidingFriction.Setup(this);
            }
        }
        ///<summary>
        /// Adds a contact to be managed by the constraint.
        ///</summary>
        ///<param name="contact">Contact to add.</param>
        public override void AddContact(Contact contact)
        {
            contact.Validate();
            var penetrationConstraint = penetrationConstraintPool.Pop();

            penetrationConstraint.Setup(this, contact);
            penetrationConstraints.Add(penetrationConstraint);
            if (!twistFriction.isActive)
            {
                //This is the first real contact.  All constraints need to become active.
                twistFriction.Setup(this);
                slidingFriction.Setup(this);
            }
        }