Class DampedSpring

    Definition

    Namespace:
    Tizen.NUI.Physics2D.Chipmunk
    Assembly:
    Tizen.NUI.Physics2D.dll

    DampedSpring is a damped spring. The spring allows you to define the rest length, stiffness and damping.

    public class DampedSpring : Constraint
    Inheritance
    object
    Constraint
    DampedSpring

    Constructors

    View Source

    DampedSpring(Body, Body, Vect, Vect, double, double, double)

    Defined much like a slide joint.

    Declaration
    public DampedSpring(Body bodyA, Body bodyB, Vect anchorA, Vect anchorB, double restLength, double stiffness, double damping)
    Parameters
    Type Name Description
    Body bodyA

    The first connected body.

    Body bodyB

    The second connected body.

    Vect anchorA

    Anchor point a, relative to body a.

    Vect anchorB

    Anchor point b, relative to body b.

    double restLength

    The distance the spring wants to be.

    double stiffness

    The spring constant (Young’s modulus).

    double damping

    How soft to make the damping of the spring.

    Properties

    View Source

    AnchorA

    The location of the first anchor relative to the first body.

    Declaration
    public Vect AnchorA { get; set; }
    Property Value
    Type Description
    Vect
    View Source

    AnchorB

    The location of the second anchor relative to the second body.

    Declaration
    public Vect AnchorB { get; set; }
    Property Value
    Type Description
    Vect
    View Source

    Damping

    The damping of the spring.

    Declaration
    public double Damping { get; set; }
    Property Value
    Type Description
    double
    View Source

    ForceFunction

    Damped spring force custom function callback.

    Declaration
    public Func<DampedSpring, double, double> ForceFunction { get; set; }
    Property Value
    Type Description
    Func<, , ><DampedSpring, double, double>
    View Source

    RestLength

    The rest length of the spring.

    Declaration
    public double RestLength { get; set; }
    Property Value
    Type Description
    double
    View Source

    Stiffness

    The stiffness of the spring in force/distance.

    Declaration
    public double Stiffness { get; set; }
    Property Value
    Type Description
    double

    Methods

    View Source

    IsDampedSpring(Constraint)

    Check if a constraint is a DampedSpring.

    Declaration
    public static bool IsDampedSpring(Constraint constraint)
    Parameters
    Type Name Description
    Constraint constraint
    Returns
    Type Description
    bool

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX