Panda3D
panda
src
putil
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
*/
17
INLINE
double
PointerData::
18
get_x()
const
{
19
return
_xpos;
20
}
21
22
/**
23
*
24
*/
25
INLINE
double
PointerData::
26
get_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
*/
34
INLINE
bool
PointerData::
35
get_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
*/
45
INLINE
int
PointerData::
46
get_id
()
const
{
47
return
_id;
48
}
49
50
/**
51
* Returns the type of pointing device.
52
*/
53
INLINE
PointerType
PointerData::
54
get_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
*/
62
INLINE
double
PointerData::
63
get_pressure
()
const
{
64
return
_pressure;
65
}
66
67
68
INLINE std::ostream &operator << (std::ostream &out,
const
PointerData
&md) {
69
md.output(out);
70
return
out;
71
}
PointerData::get_type
get_type
Returns the type of pointing device.
Definition:
pointerData.h:54
PointerData::get_pressure
get_pressure
Returns the pressure of the pointer.
Definition:
pointerData.h:57
PointerData
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
PointerData::get_in_window
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
PointerType
PointerType
Contains the types of pointer device.
Definition:
pointerData.h:25
PointerData::get_id
get_id
Returns a unique identifier for this pointer.
Definition:
pointerData.h:55
Generated on Sat Jan 11 2020 15:15:33 for Panda3D by
1.8.17