GH_RotationalTuningData<T>

public class GH_RotationalTuningData<T>
Utility class for keeping track of rotational mouse events.
TBasic type for initial conditions.

Constructors

GH_RotationalTuningData

#
public GH_RotationalTuningData(T initialValue, PointF pivot, PointF initialPoint)
Create a new instance of the rotational tuning data.
initialValue (T)Initial value to store. Whatever you want it to be.
pivot (PointF)Center of rotation.
initialPoint (PointF)First point of track.

GH_RotationalTuningData

#
public GH_RotationalTuningData(T initialValue, PointF pivot)
Create a new instance of the rotational tuning data.
initialValue (T)Initial value to store. Whatever you want it to be.
pivot (PointF)Center of rotation.

Properties

FrameCount

#
public int FrameCount { get; }
Gets the total number of recorded frames.

InitialValue

#
public T InitialValue { get; }
Gets the initial value.

Pivot

#
public PointF Pivot { get; set; }
Gets or sets the rotational pivot. You only need to set this if the pivot changes.

Indexers

Frame

#
public GH_RotationalFrame this[int index] { get; }
Gets the frame at the given index.
index (int)Index of frame.

Methods

AddFrame

#
public void AddFrame(PointF point)
Grow the tuning track by one point and compute the angle.
point (PointF)Point (in canvas coordinates) to record.

TotalAngle

#
public double TotalAngle()
Compute the total angle from the first to the last frame.

TotalTurns

#
public double TotalTurns()
Compute the total number of full turns from the first to the last frame.