Public Member Functions |
|
| PointerEventList (const PointerEventList ©) |
| void | add_event (bool in_win, int xpos, int ypos, int seq, double time) |
| | Adds a new event to the end of the list.
|
| void | clear () |
| | Empties all the events from the list.
|
| bool | encircles (int x, int y) const |
| | Returns true if the trail loops around the specified point.
|
|
virtual TypeHandle | force_init_type () |
| double | get_direction (int n) const |
| | Get the direction of the nth event.
|
| int | get_dx (int n) const |
| | Get the x-coordinate of the nth event.
|
| int | get_dy (int n) const |
| | Get the y-coordinate of the nth event.
|
| bool | get_in_window (int n) const |
| | Get the in-window flag of the nth event.
|
| double | get_length (int n) const |
| | Get the length of the nth event.
|
| int | get_num_events () const |
| | Returns the number of events in the list.
|
| double | get_rotation (int n) const |
| | Get the rotation of the nth event.
|
| int | get_sequence (int n) const |
| | Get the sequence number of the nth event.
|
| double | get_time (int n) const |
| | Get the timestamp of the nth event.
|
|
virtual TypeHandle | get_type () const |
| int | get_xpos (int n) const |
| | Get the x-coordinate of the nth event.
|
| int | get_ypos (int n) const |
| | Get the y-coordinate of the nth event.
|
| double | match_pattern (const string &pattern, double rot, double seglen) |
| | This function is not implemented yet.
|
|
void | operator= (const PointerEventList ©) |
|
virtual void | output (ostream &out) const |
| void | pop_front () |
| | Discards the first event on the list.
|
| double | total_turns (double sec) const |
| | returns the total angular deviation that the trail has made in the specified time period.
|
|
void | write (ostream &out, int indent_level=0) const |
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
|
static void | init_type () |
Records a set of pointer events that happened recently.
This class is usually used only in the data graph, to transmit the recent pointer presses, but it may be used anywhere a list of PointerEvents is desired.
Definition at line 37 of file pointerEventList.h.
| void PointerEventList::add_event |
( |
bool |
in_win, |
|
|
int |
xpos, |
|
|
int |
ypos, |
|
|
int |
seq, |
|
|
double |
time |
|
) |
| |
Adds a new event to the end of the list.
Automatically calculates the dx, dy, length, direction, and rotation for all but the first event.
Definition at line 96 of file pointerEventList.cxx.
| double PointerEventList::match_pattern |
( |
const string & |
ascpat, |
|
|
double |
rot, |
|
|
double |
seglen |
|
) |
| |
This function is not implemented yet.
It is a work in progress. The intent is as follows:
Returns a nonzero value if the mouse movements match the specified pattern. The higher the value, the better the match. The pattern is a sequence of compass directions (ie, "E", "NE", etc) separated by spaces. If rot is nonzero, then the pattern is rotated counterclockwise by the specified amount before testing. Seglen is the minimum length a mouse movement needs to be in order to be considered significant.
Definition at line 198 of file pointerEventList.cxx.