C# Класс Gearset.Components.CurveEditorControl.KeyWrapper

Wraps a CurveKey, giving it an ID and a reference to it's owner curve.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
latestId long

Открытые методы

Метод Описание
ComputeTangentIfAuto ( ) : void

Computes the tangent of this key (if set to some automatic mode). It will also recomute the tangents of adjacent keys if they're also auto.

GetPosition ( ) : System.Windows.Point

Returns the position of the key in curve coords.

GetPrevAndNextDistance ( float &prev, float &next ) : void

Get distance between given index key position and previous/next key. Based on XNA's curve editor method.

GetTangentHandleScreenPositions ( System &inHandle, System &outHandle ) : void

Gets the positions of the tangent handles in screen coords.

IsTangentModeAuto ( KeyTangentMode tangentMode ) : bool

Returns true if the passed KeyTangentMode is automatically, i.e. it is supposed to be calculated everytime the key is moved.

KeyWrapper ( CurveKey curveKey, Gearset.Components.CurveEditorControl.CurveWrapper curve, KeyTangentMode tangentMode, long id = -1 ) : System

Initializes a KeyWrapper

MoveKey ( float positionOffset, float valueOffset ) : void

Moves the key by the given offset. It will actually remove the old key from the curve and add a new offseted curve.

Приватные методы

Метод Описание
GetIndex ( ) : int
SetInTangent ( float tangent, bool computeTangents = true ) : void
SetOutTangent ( float tangent, bool computeTangents = true ) : void

Описание методов

ComputeTangentIfAuto() публичный Метод

Computes the tangent of this key (if set to some automatic mode). It will also recomute the tangents of adjacent keys if they're also auto.
public ComputeTangentIfAuto ( ) : void
Результат void

GetPosition() публичный Метод

Returns the position of the key in curve coords.
public GetPosition ( ) : System.Windows.Point
Результат System.Windows.Point

GetPrevAndNextDistance() публичный Метод

Get distance between given index key position and previous/next key. Based on XNA's curve editor method.
public GetPrevAndNextDistance ( float &prev, float &next ) : void
prev float
next float
Результат void

GetTangentHandleScreenPositions() публичный Метод

Gets the positions of the tangent handles in screen coords.
public GetTangentHandleScreenPositions ( System &inHandle, System &outHandle ) : void
inHandle System
outHandle System
Результат void

IsTangentModeAuto() публичный Метод

Returns true if the passed KeyTangentMode is automatically, i.e. it is supposed to be calculated everytime the key is moved.
public IsTangentModeAuto ( KeyTangentMode tangentMode ) : bool
tangentMode KeyTangentMode
Результат bool

KeyWrapper() публичный Метод

Initializes a KeyWrapper
public KeyWrapper ( CurveKey curveKey, Gearset.Components.CurveEditorControl.CurveWrapper curve, KeyTangentMode tangentMode, long id = -1 ) : System
curveKey CurveKey The key to wrap
curve Gearset.Components.CurveEditorControl.CurveWrapper The curve that owns curveKey
tangentMode KeyTangentMode
id long Pass -1 to autogenerate a new id
Результат System

MoveKey() публичный Метод

Moves the key by the given offset. It will actually remove the old key from the curve and add a new offseted curve.
public MoveKey ( float positionOffset, float valueOffset ) : void
positionOffset float
valueOffset float
Результат void

Описание свойств

latestId публичное статическое свойство

public static long latestId
Результат long