///<summary> /// Cleans upt he friction constraint. ///</summary> public void CleanUp() { accumulatedImpulse = 0; contactManifoldConstraint = null; penetrationConstraint = null; entityA = null; entityB = null; IsActive = false; }
///<summary> /// Configures the penetration constraint. ///</summary> ///<param name="contactManifoldConstraint">Owning manifold constraint.</param> ///<param name="contact">Contact associated with the penetration constraint.</param> public void Setup(ContactManifoldConstraint contactManifoldConstraint, Contact contact) { this.contactManifoldConstraint = contactManifoldConstraint; this.contact = contact; isActive = true; entityA = contactManifoldConstraint.EntityA; entityB = contactManifoldConstraint.EntityB; }
///<summary> /// Cleans up the constraint. ///</summary> public void CleanUp() { accumulatedImpulse = F64.C0; contactManifoldConstraint = null; contact = null; entityA = null; entityB = null; isActive = false; }
///<summary> /// Configures the penetration constraint. ///</summary> ///<param name="contactManifoldConstraint">Owning manifold constraint.</param> ///<param name="contact">Contact associated with the penetration constraint.</param> public void Setup(ContactManifoldConstraint contactManifoldConstraint, Contact contact) { this.contactManifoldConstraint = contactManifoldConstraint; this.contact = contact; isActive = true; entityA = contactManifoldConstraint.EntityA; entityB = contactManifoldConstraint.EntityB; entityADynamic = entityA != null && entityA.isDynamic; entityBDynamic = entityB != null && entityB.isDynamic; }
///<summary> /// Configures the friction constraint for a new contact. ///</summary> ///<param name="contactManifoldConstraint">Manifold to which the constraint belongs.</param> ///<param name="penetrationConstraint">Penetration constraint associated with this friction constraint.</param> public void Setup(ContactManifoldConstraint contactManifoldConstraint, ContactPenetrationConstraint penetrationConstraint) { this.contactManifoldConstraint = contactManifoldConstraint; this.penetrationConstraint = penetrationConstraint; IsActive = true; linearAX = 0; linearAY = 0; linearAZ = 0; entityA = contactManifoldConstraint.EntityA; entityB = contactManifoldConstraint.EntityB; }
///<summary> /// Configures the friction constraint for a new contact. ///</summary> ///<param name="contactManifoldConstraint">Manifold to which the constraint belongs.</param> ///<param name="penetrationConstraint">Penetration constraint associated with this friction constraint.</param> public void Setup(ContactManifoldConstraint contactManifoldConstraint, ContactPenetrationConstraint penetrationConstraint) { this.contactManifoldConstraint = contactManifoldConstraint; this.penetrationConstraint = penetrationConstraint; IsActive = true; linearAX = 0; linearAY = 0; linearAZ = 0; entityA = contactManifoldConstraint.EntityA; entityB = contactManifoldConstraint.EntityB; entityAIsDynamic = entityA != null && entityA.isDynamic; entityBIsDynamic = entityB != null && entityB.isDynamic; }