Click or drag to resize
DigitalRuneDampedSpring Class
Connects to rigid bodies with a damped spring.
Inheritance Hierarchy

Namespace: DigitalRune.Physics.ForceEffects
Assembly: DigitalRune.Physics (in DigitalRune.Physics.dll) Version: 1.10.0.0 (1.10.0.14427)
Syntax
public class DampedSpring : ForceEffect

The DampedSpring type exposes the following members.

Constructors
  NameDescription
Public methodDampedSpring
Initializes a new instance of the DampedSpring class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnAddToSimulation
Called when this force effect is added to a simulation.
(Inherited from ForceEffect.)
Protected methodOnApply
Called when the simulation wants this force effect to apply forces to rigid bodies.
(Overrides ForceEffectOnApply.)
Protected methodOnDisabled
Called when this force effect was disabled.
(Inherited from ForceEffect.)
Protected methodOnEnabled
Called when this force effect was enabled.
(Inherited from ForceEffect.)
Protected methodOnRemoveFromSimulation
Called when this force effect is removed from a simulation.
(Inherited from ForceEffect.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAttachmentPositionALocal
Gets or sets the position where the spring is attached to the first body (in local space of the first body).
Public propertyAttachmentPositionBLocal
Gets or sets the position where the spring is attached to the second body (in local space of the second body).
Public propertyBodyA
Gets or sets the first rigid body.
Public propertyBodyB
Gets or sets the second rigid body.
Public propertyDampingConstant
Gets or sets the damping constant.
Public propertyEnabled
Gets or sets a value indicating whether this ForceEffect is enabled.
(Inherited from ForceEffect.)
Public propertyLength
Gets or sets the rest length of the spring.
Public propertySimulation
Gets the simulation to which this force effect belongs.
(Inherited from ForceEffect.)
Public propertySpringConstant
Gets or sets the spring constant.
Top
Remarks
A better, more stable way to model a damped spring is to use joints instead of this force effect. You can model damped spring by using a PositionMotor. Especially for high spring constants (stiff springs) joints are more stable.
See Also