PointerEventList
from panda3d.core import PointerEventList
- class PointerEventList
Bases:
Bases:
ParamValueBase
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.
Inheritance diagram
- __init__()
- addEvent(data: PointerData, seq: int, time: float)
Adds a new event from the given
PointerData
object.
- addEvent(in_win: bool, xpos: int, ypos: int, xdelta: float, ydelta: float, seq: int, time: float)
Adds a new event to the end of the list based on the given mouse movement.
- addEvent(in_win: bool, xpos: int, ypos: int, seq: int, time: float)
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.
- clear()
Empties all the events from the list.
- static getClassType() TypeHandle
- matchPattern(pattern: str, rot: float, seglen: float) float
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.
- popFront()
Discards the first event on the list.