|  | ContactConstraint Class | 
 Inheritance Hierarchy
Inheritance HierarchyNamespace: DigitalRune.Physics.Constraints
 Syntax
SyntaxThe ContactConstraint type exposes the following members.
 Methods
Methods| Name | Description | |
|---|---|---|
|  | ApplyImpulse | 
            Called by the simulation to apply an impulse that satisfies the constraint.
             | 
|  | Equals | (Inherited from Object.) | 
|  | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | Setup | 
            Called by the simulation to prepare this constraint for constraint solving for a new time
            step.
             | 
|  | ToString | Returns a string that represents the current object.(Inherited from Object.) | 
 Properties
Properties| Name | Description | |
|---|---|---|
|  | BodyA | 
            Gets the first body.
             | 
|  | BodyB | 
            Gets the second body.
             | 
|  | Contact | 
            Gets the contact.
             | 
|  | ErrorReduction | 
            Gets or sets the error reduction parameter.
             | 
|  | LinearConstraintImpulse | 
            Gets or sets the linear constraint impulse that was applied. 
             | 
|  | Simulation | 
            Gets the simulation to which this constraint belongs.
             | 
 Explicit Interface Implementations
Explicit Interface Implementations| Name | Description | |
|---|---|---|
|   | IConstraintAngularConstraintImpulse | 
            Gets or sets the angular constraint impulse that was applied.
             | 
|   | IConstraintCollisionEnabled | |
|   | IConstraintEnabled | 
            Gets a value indicating whether this constraint is enabled.
             | 
 Remarks
RemarksThe simulation automatically creates ContactConstraints for all contacts that are found by the collision detection and where collision response is enabled.
The property Contact.UserData is used by the simulation to store references to the ContactConstraint instances. Therefore, the UserData property of contacts between rigid bodies must not be changed. In other words, the relationship between contacts and contact constraints is:
myContactConstraint.Contact == myContact myContact.UserData == myContactConstraint
 See Also
See Also