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
Fields
Fixed
A limit that locks the position in place (no translation allowed).
public static readonly LinearLimit Fixed
Field Value
Full
A limit that allows unrestricted movement (negative to positive infinity).
public static readonly LinearLimit Full
Field Value
Properties
From
Gets or sets the minimum distance of the limit.
public float From { readonly get; set; }
Property Value
To
Gets or sets the maximum distance of the limit.
public float To { readonly get; set; }
Property Value
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
FromMinMax(float, float)
Creates a linear limit from minimum and maximum values.
public static LinearLimit FromMinMax(float min, float max)
Parameters
Returns
- LinearLimit
A new LinearLimit instance.