Click or drag to resize

GH_MouseTracker Class

Record mouse-movements over time.
Inheritance Hierarchy
SystemObject
  Grasshopper.GUIGH_MouseTracker

Namespace:  Grasshopper.GUI
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public class GH_MouseTracker

The GH_MouseTracker type exposes the following members.

Constructors
  NameDescription
Public methodGH_MouseTracker
Create a new mouse tracker.
Public methodGH_MouseTracker(Point)
Create a new mouse tracker.
Public methodGH_MouseTracker(Point, Object)
Create a new mouse tracker.
Top
Properties
  NameDescription
Public propertyDuration
Gets the timespan that has passed between the oldest and youngest recorded frames. This is not the same as the time that has passed since recording began.
Public propertyFrame
Gets the position (in control coordinates) of the frame at the given index.
Public propertyFrameCount
Gets the number of recorded frames.
Public propertyMaximumDuration
Gets or sets the maximum allowed duration of the entire record. When new frames are recorded, old frames that are more distant than MaximumDuration will be dropped. The default duration is 10 seconds.
Public propertyMaximumFrameCount
Gets or sets the maximum number of frames to keep in history. If more frames are added, the oldest ones will be dropped. The default is 16,384 frames.
Public propertyNewestFrame
Gets the most recent frame in recorded history.
Public propertyOldestFrame
Gets the oldest frame in recorded history.
Public propertyTemporalAccuracy
Gets or sets the maximum temporal accuracy. Frames that are closer together than the accuracy will not be recorded. The default accuracy equals 5ms.
Top
Methods
  NameDescription
Public methodDeviation
Gets the maximum deviation of the recorded mouse path. The maximum deviation is the furthest distance the mouse has been from the first point in the history record.
Public methodDeviation(DateTime, DateTime)
Gets the maximum deviation of the recorded mouse path. The maximum deviation is the furthest distance the mouse has been from the first point in the history span. It does not measure the largest deviation between any two points in the time span, only the first and any subsequent point.
Public methodDropFrames(DateTime)
Drop all frames older than a given limit.
Public methodDropFrames(Double)
Find the youngest frame that deviates too much from the current locus and drop it and everything preceding it.
Public methodDropFrames(Double, Point)
Find the youngest frame that deviates too much from the given locus and drop it and everything preceding it.
Public methodLastFrameWithinDeviation
Starting from the youngest frame, finds the oldest frame that is still within a maximum deviation of the youngest frame.
Public methodRecord(Point)
Record a new mouse event frame. If this frame is closer than [Accuracy]ms to the previously recorded frame, it is not included.
Public methodRecord(Point, Object)
Record a new mouse event frame. If this frame is closer than [Accuracy]ms to the previously recorded frame, it is not included.
Public methodToString (Overrides ObjectToString.)
Top
See Also