Struct FixedCurveKey
- Namespace
- FixedMathSharp
- Assembly
- FixedMathSharp.dll
Represents a keyframe in a FixedCurve, defining a value at a specific time.
[MemoryPackable(GenerateType.Object)]
public struct FixedCurveKey : IEquatable<FixedCurveKey>, IMemoryPackable<FixedCurveKey>, IMemoryPackFormatterRegister
- Implements
-
IMemoryPackable<FixedCurveKey>IMemoryPackFormatterRegister
- Inherited Members
Remarks
MemoryPack GenerateType: unmanaged
FixedMathSharp.Fixed64 Time
FixedMathSharp.Fixed64 Value
FixedMathSharp.Fixed64 InTangent
FixedMathSharp.Fixed64 OutTangent
Constructors
FixedCurveKey(Fixed64, Fixed64)
Creates a keyframe with a specified time and value.
public FixedCurveKey(Fixed64 time, Fixed64 value)
Parameters
FixedCurveKey(Fixed64, Fixed64, Fixed64, Fixed64)
Creates a keyframe with optional tangents for cubic interpolation.
[JsonConstructor]
public FixedCurveKey(Fixed64 time, Fixed64 value, Fixed64 inTangent, Fixed64 outTangent)
Parameters
FixedCurveKey(int, int)
Creates a keyframe with a specified time and value, using integer parameters for convenience.
public FixedCurveKey(int time, int value)
Parameters
FixedCurveKey(int, int, int, int)
Creates a keyframe with optional tangents for cubic interpolation, using integer parameters for convenience.
public FixedCurveKey(int time, int value, int inTangent, int outTangent)
Parameters
Fields
InTangent
The incoming tangent for cubic interpolation.
[JsonInclude]
[MemoryPackOrder(2)]
public Fixed64 InTangent
Field Value
OutTangent
The outgoing tangent for cubic interpolation.
[JsonInclude]
[MemoryPackOrder(3)]
public Fixed64 OutTangent
Field Value
Time
The time at which this keyframe occurs.
[JsonInclude]
[MemoryPackOrder(0)]
public Fixed64 Time
Field Value
Value
The value of the curve at this keyframe.
[JsonInclude]
[MemoryPackOrder(1)]
public Fixed64 Value
Field Value
Methods
Equals(FixedCurveKey)
public bool Equals(FixedCurveKey other)
Parameters
otherFixedCurveKey
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
FromDouble(double, double)
Creates a keyframe with a specified time and value.
public static FixedCurveKey FromDouble(double time, double value)
Parameters
Returns
Remarks
Values are converted through FromDouble(double), so non-finite values throw ArgumentOutOfRangeException and finite values outside the Q32.32 range throw OverflowException.
FromDouble(double, double, double, double)
Creates a keyframe with optional tangents for cubic interpolation.
public static FixedCurveKey FromDouble(double time, double value, double inTangent, double outTangent)
Parameters
Returns
Remarks
Values are converted through FromDouble(double), so non-finite values throw ArgumentOutOfRangeException and finite values outside the Q32.32 range throw OverflowException.
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(FixedCurveKey, FixedCurveKey)
Determines whether two FixedCurveKey instances are equal.
public static bool operator ==(FixedCurveKey left, FixedCurveKey right)
Parameters
leftFixedCurveKeyrightFixedCurveKey
Returns
operator !=(FixedCurveKey, FixedCurveKey)
Determines whether two FixedCurveKey instances are not equal.
public static bool operator !=(FixedCurveKey left, FixedCurveKey right)
Parameters
leftFixedCurveKeyrightFixedCurveKey