Class Constraint

    Definition

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

    Base class of all constraints. You usually don’t want to create instances of this class directly, but instead use one of the specific constraints such as the PinJoint.

    public abstract class Constraint : IDisposable
    Inheritance
    object
    Constraint
    Derived
    DampedRotarySpring
    DampedSpring
    GearJoint
    GrooveJoint
    PinJoint
    PivotJoint
    RatchetJoint
    RotaryLimitJoint
    SimpleMotor
    SlideJoint

    Constructors

    View Source

    Constraint(IntPtr)

    Construct a constraint with the given native handle.

    Declaration
    protected Constraint(System.IntPtr handle)
    Parameters
    Type Name Description
    System.IntPtr handle

    Properties

    View Source

    BodyA

    Get the first body the constraint is attached to.

    Declaration
    public Body BodyA { get; }
    Property Value
    Type Description
    Body
    View Source

    BodyB

    Get the second body the constraint is attached to.

    Declaration
    public Body BodyB { get; }
    Property Value
    Type Description
    Body
    View Source

    CollideBodies

    Whether the two bodies connected by the constraint are allowed to collide or not.

    When two bodies collide, Chipmunk ignores the collisions if this property is set to False on any constraint that connects the two bodies. Defaults to True. This can be used to create a chain that self-collides, but adjacent links in the chain do not collide.

    Declaration
    public bool CollideBodies { get; set; }
    Property Value
    Type Description
    bool
    View Source

    Data

    The user-definable data pointer for this constraint.

    Declaration
    public object Data { get; set; }
    Property Value
    Type Description
    object
    View Source

    ErrorBias

    Rate at which joint error is corrected. Defaults to pow(1.0 - 0.1, 60.0) meaning that it will correct 10% of the error every 1/60th of a second.

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

    Handle

    Native handle to constraint.

    Declaration
    public System.IntPtr Handle { get; }
    Property Value
    Type Description
    System.IntPtr
    View Source

    Impulse

    Get the last impulse applied by this constraint.

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

    MaxBias

    The maximum rate at which joint error is corrected.

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

    MaxForce

    ; The maximum force that this constraint is allowed to use.

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

    PostSolve

    Post-solve function that is called after the solver runs.

    Declaration
    public Action<Constraint, Space> PostSolve { get; set; }
    Property Value
    Type Description
    Action<, ><Constraint, Space>
    View Source

    PreSolve

    Pre-solve function that is called before the solver runs.

    Declaration
    public Action<Constraint, Space> PreSolve { get; set; }
    Property Value
    Type Description
    Action<, ><Constraint, Space>
    View Source

    Space

    Get the cpSpace this constraint is added to.

    Declaration
    public Space Space { get; }
    Property Value
    Type Description
    Space

    Methods

    View Source

    Dispose()

    Destroy the constraint

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Dispose the constraint.

    Declaration
    protected virtual void Dispose(bool dispose)
    Parameters
    Type Name Description
    bool dispose
    View Source

    Free()

    Destroy and free the constraint.

    Declaration
    public void Free()
    View Source

    FromHandle(IntPtr)

    Get a Constraint object from a native handle.

    Declaration
    public static Constraint FromHandle(System.IntPtr constraint)
    Parameters
    Type Name Description
    System.IntPtr constraint
    Returns
    Type Description
    Constraint

    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