C# 클래스 Gearset.Components.CurveEditorControl.KeyWrapper

Wraps a CurveKey, giving it an ID and a reference to it's owner curve.
파일 보기 프로젝트 열기: juancampa/Gearset 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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