Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
PointerData Class Reference

Holds the data that might be generated by a 2-d pointer input device, such as the mouse in the GraphicsWindow. More...

#include "pointerData.h"

Public Member Functions

int get_id () const
 
bool get_in_window () const
 
double get_pressure () const
 
PointerType get_type () const
 
double get_x () const
 
double get_y () const
 
void output (std::ostream &out) const
 

Public Attributes

int _id = 0
 
bool _in_window = false
 
double _pressure = 0.0
 
PointerType _type = PointerType::unknown
 
double _xpos = 0.0
 
double _ypos = 0.0
 
 get_id
 Returns a unique identifier for this pointer.
 
 get_in_window
 If this returns false, the pointer is not currently present in the window and the values returned by get_x() and get_y() may not be meaningful.
 
 get_pressure
 Returns the pressure of the pointer.
 
 get_type
 Returns the type of pointing device.
 
 get_x
 
 get_y
 

Detailed Description

Holds the data that might be generated by a 2-d pointer input device, such as the mouse in the GraphicsWindow.

Definition at line 38 of file pointerData.h.

Member Function Documentation

◆ output()

void PointerData::output ( std::ostream & out) const

Definition at line 19 of file pointerData.cxx.

Member Data Documentation

◆ _id

int PointerData::_id = 0

Definition at line 65 of file pointerData.h.

◆ _in_window

bool PointerData::_in_window = false

Definition at line 60 of file pointerData.h.

◆ _pressure

double PointerData::_pressure = 0.0

Definition at line 63 of file pointerData.h.

◆ _type

PointerType PointerData::_type = PointerType::unknown

Definition at line 64 of file pointerData.h.

◆ _xpos

double PointerData::_xpos = 0.0

Definition at line 61 of file pointerData.h.

◆ _ypos

double PointerData::_ypos = 0.0

Definition at line 62 of file pointerData.h.

◆ get_id

int PointerData::get_id
inline

Returns a unique identifier for this pointer.

This is for tracking individual fingers. This value should not be assumed to have a specific meaning other than that there will not be two different pointers active simultaneously with the same identifier.

Definition at line 55 of file pointerData.h.

◆ get_in_window

bool PointerData::get_in_window
inline

If this returns false, the pointer is not currently present in the window and the values returned by get_x() and get_y() may not be meaningful.

Definition at line 56 of file pointerData.h.

Referenced by x11GraphicsWindow::move_pointer().

◆ get_pressure

double PointerData::get_pressure
inline

Returns the pressure of the pointer.

For mice, this will be 1.0 if any button is pressed, 0.0 otherwise.

Definition at line 57 of file pointerData.h.

◆ get_type

PointerType PointerData::get_type
inline

Returns the type of pointing device.

Definition at line 54 of file pointerData.h.

◆ get_x

double PointerData::get_x
inline

Definition at line 52 of file pointerData.h.

◆ get_y

double PointerData::get_y
inline

Definition at line 53 of file pointerData.h.


The documentation for this class was generated from the following files: