Panda3D
Loading...
Searching...
No Matches
pointerEvent.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file pointerEvent.I
10 * @author jyelon
11 * @date 2007-09-20
12 */
13
14/**
15 * The equality operator does not consider time significant.
16 */
17INLINE bool PointerEvent::
18operator == (const PointerEvent &other) const {
19 return (_in_window == other._in_window &&
20 _xpos == other._xpos &&
21 _ypos == other._ypos &&
22 _dx == other._dx &&
23 _dy == other._dy &&
24 _sequence == other._sequence &&
25 _length == other._length &&
26 _direction == other._direction &&
27 _rotation == other._rotation);
28}
29
30/**
31 *
32 */
33INLINE bool PointerEvent::
34operator != (const PointerEvent &other) const {
35 return !operator == (other);
36}
37
38/**
39 *
40 */
41INLINE bool PointerEvent::
42operator < (const PointerEvent &other) const {
43 if (_sequence != other._sequence) {
44 return _sequence < other._sequence;
45 }
46 if (_xpos != other._xpos) {
47 return _xpos < other._xpos;
48 }
49 if (_ypos != other._ypos) {
50 return _ypos < other._ypos;
51 }
52 if (_dx != other._dx) {
53 return _dx < other._dx;
54 }
55 if (_dy != other._dy) {
56 return _dy < other._dy;
57 }
58 if (_length != other._length) {
59 return _length < other._length;
60 }
61 if (_direction != other._direction) {
62 return _direction < other._direction;
63 }
64 if (_rotation != other._rotation) {
65 return _rotation < other._rotation;
66 }
67 return _in_window < other._in_window;
68}
Records a pointer movement event.
bool operator==(const PointerEvent &other) const
The equality operator does not consider time significant.