Panda3D
Loading...
Searching...
No Matches
pointerData.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 pointerData.I
10 * @author drose
11 * @date 2002-07-15
12 */
13
14/**
15 *
16 */
17INLINE double PointerData::
18get_x() const {
19 return _xpos;
20}
21
22/**
23 *
24 */
25INLINE double PointerData::
26get_y() const {
27 return _ypos;
28}
29
30/**
31 * If this returns false, the pointer is not currently present in the window
32 * and the values returned by get_x() and get_y() may not be meaningful.
33 */
34INLINE bool PointerData::
35get_in_window() const {
36 return _in_window;
37}
38
39/**
40 * Returns a unique identifier for this pointer. This is for tracking
41 * individual fingers. This value should not be assumed to have a specific
42 * meaning other than that there will not be two different pointers active
43 * simultaneously with the same identifier.
44 */
45INLINE int PointerData::
46get_id() const {
47 return _id;
48}
49
50/**
51 * Returns the type of pointing device.
52 */
54get_type() const {
55 return _type;
56}
57
58/**
59 * Returns the pressure of the pointer. For mice, this will be 1.0 if any
60 * button is pressed, 0.0 otherwise.
61 */
62INLINE double PointerData::
63get_pressure() const {
64 return _pressure;
65}
66
67
68INLINE std::ostream &operator << (std::ostream &out, const PointerData &md) {
69 md.output(out);
70 return out;
71}
Holds the data that might be generated by a 2-d pointer input device, such as the mouse in the Graphi...
Definition pointerData.h:38
get_pressure
Returns the pressure of the pointer.
Definition pointerData.h:57
get_in_window
If this returns false, the pointer is not currently present in the window and the values returned by ...
Definition pointerData.h:56
get_id
Returns a unique identifier for this pointer.
Definition pointerData.h:55
get_type
Returns the type of pointing device.
Definition pointerData.h:54
PointerType
Contains the types of pointer device.
Definition pointerData.h:25