Table of Contents

Struct LinearLimit

Namespace
Jitter2.Dynamics.Constraints
Assembly
Jitter2.dll

Represents a linear limit defined by a minimum and maximum distance. Used by constraints to restrict translational motion within a specified range.

public struct LinearLimit
Inherited Members

Constructors

LinearLimit(float, float)

Represents a linear limit defined by a minimum and maximum distance. Used by constraints to restrict translational motion within a specified range.

public LinearLimit(float from, float to)

Parameters

from float

The minimum distance of the limit.

to float

The maximum distance of the limit.

Fields

Fixed

A limit that locks the position in place (no translation allowed).

public static readonly LinearLimit Fixed

Field Value

LinearLimit

Full

A limit that allows unrestricted movement (negative to positive infinity).

public static readonly LinearLimit Full

Field Value

LinearLimit

Properties

From

Gets or sets the minimum distance of the limit.

public float From { readonly get; set; }

Property Value

float

To

Gets or sets the maximum distance of the limit.

public float To { readonly get; set; }

Property Value

float

Methods

Deconstruct(out float, out float)

Deconstructs the limit into its minimum and maximum distances.

public readonly void Deconstruct(out float limitMin, out float limitMax)

Parameters

limitMin float

The minimum distance.

limitMax float

The maximum distance.

FromMinMax(float, float)

Creates a linear limit from minimum and maximum values.

public static LinearLimit FromMinMax(float min, float max)

Parameters

min float

The minimum distance.

max float

The maximum distance.

Returns

LinearLimit

A new LinearLimit instance.