Table of Contents

Class CurveKey

Namespace
Microsoft.Xna.Framework
Assembly
MonoGame.Framework.dll

Key point on the Curve.

[DataContract]
public class CurveKey : IEquatable<CurveKey>, IComparable<CurveKey>
Inheritance
CurveKey
Implements
Inherited Members

Constructors

CurveKey()

Creates a new instance of CurveKey class with position: 0 and value: 0.

public CurveKey()

CurveKey(float, float)

Creates a new instance of CurveKey class.

public CurveKey(float position, float value)

Parameters

position float

Position on the curve.

value float

Value of the control point.

CurveKey(float, float, float, float)

Creates a new instance of CurveKey class.

public CurveKey(float position, float value, float tangentIn, float tangentOut)

Parameters

position float

Position on the curve.

value float

Value of the control point.

tangentIn float

Tangent approaching point from the previous point on the curve.

tangentOut float

Tangent leaving point toward next point on the curve.

CurveKey(float, float, float, float, CurveContinuity)

Creates a new instance of CurveKey class.

public CurveKey(float position, float value, float tangentIn, float tangentOut, CurveContinuity continuity)

Parameters

position float

Position on the curve.

value float

Value of the control point.

tangentIn float

Tangent approaching point from the previous point on the curve.

tangentOut float

Tangent leaving point toward next point on the curve.

continuity CurveContinuity

Indicates whether the curve is discrete or continuous.

Properties

Continuity

Gets or sets the indicator whether the segment between this point and the next point on the curve is discrete or continuous.

[DataMember]
public CurveContinuity Continuity { get; set; }

Property Value

CurveContinuity

Position

Gets a position of the key on the curve.

[DataMember]
public float Position { get; }

Property Value

float

TangentIn

Gets or sets a tangent when approaching this point from the previous point on the curve.

[DataMember]
public float TangentIn { get; set; }

Property Value

float

TangentOut

Gets or sets a tangent when leaving this point to the next point on the curve.

[DataMember]
public float TangentOut { get; set; }

Property Value

float

Value

Gets a value of this point.

[DataMember]
public float Value { get; set; }

Property Value

float

Methods

Clone()

Creates a copy of this key.

public CurveKey Clone()

Returns

CurveKey

A copy of this key.

CompareTo(CurveKey)

public int CompareTo(CurveKey other)

Parameters

other CurveKey

Returns

int

Equals(CurveKey)

public bool Equals(CurveKey other)

Parameters

other CurveKey

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(CurveKey, CurveKey)

Compares whether two CurveKey instances are equal.

public static bool operator ==(CurveKey value1, CurveKey value2)

Parameters

value1 CurveKey

CurveKey instance on the left of the equal sign.

value2 CurveKey

CurveKey instance on the right of the equal sign.

Returns

bool

true if the instances are equal; false otherwise.

operator !=(CurveKey, CurveKey)

Compares whether two CurveKey instances are not equal.

public static bool operator !=(CurveKey value1, CurveKey value2)

Parameters

value1 CurveKey

CurveKey instance on the left of the not equal sign.

value2 CurveKey

CurveKey instance on the right of the not equal sign.

Returns

bool

true if the instances are not equal; false otherwise.