MeVisLab Toolbox Reference
|
SoPointerPosition manages the current position of the mouse cursor. More...
#include <SoPointerPosition.h>
Public Member Functions | |
SoPointerPosition () | |
Default constructor. More... | |
SoPointerPosition (const int v[2]) | |
SoPointerPosition (int x, int y) | |
SoPointerPosition (const SoPointerPosition &other)=default | |
bool | isNull () const |
Returns whether the stored position is the coordinate system's origin (0/0). More... | |
int | manhattanLength () const |
Returns the manhattan distance of this position to the coordinate system's origin. More... | |
int | x () const |
Returns the x-component of this position. More... | |
int | y () const |
Returns the y-component of this position. More... | |
void | getValue (int &x, int &y) const |
Returns the position as two individual components. More... | |
SoPointerPosition & | setValue (const int v[2]) |
Sets the value of vector from array of two components. More... | |
SoPointerPosition & | setValue (int x, int y) |
Sets the value of vector from two individual components. More... | |
int | operator[] (int i) const |
Accesses the indexed component of the position vector. More... | |
SoPointerPosition & | operator= (const SoPointerPosition &u) |
Assignment operator. More... | |
SoHandleEventAction * | getAction () const |
Returns the Inventor action. More... | |
SoState * | getState () const |
Returns the Inventor state. More... | |
template<class T > | |
void | set (T *data) |
Sets a pointer to additional position data, e.g., for SoView2D or SoDiagram2D. More... | |
template<class T > | |
T * | get () const |
Returns a pointer to additional position data. More... | |
const View2DPosition * | getView2DPosition () const |
Returns the additional data as View2DPosition. Legacy support, rather use get<View2DPosition>(). More... | |
Friends | |
class | SoInteractionHandler |
Let only the SoInteractionHandler set the SoHandleEventAction on this position. More... | |
SOMANAGEDINTERACTION_API bool | operator== (const SoPointerPosition &v1, const SoPointerPosition &v2) |
Equality comparison operator. More... | |
SOMANAGEDINTERACTION_API bool | operator!= (const SoPointerPosition &v1, const SoPointerPosition &v2) |
Negated equality comparison operator. More... | |
SoPointerPosition manages the current position of the mouse cursor.
Definition at line 27 of file SoPointerPosition.h.
SoPointerPosition::SoPointerPosition | ( | ) |
Default constructor.
SoPointerPosition::SoPointerPosition | ( | const int | v[2] | ) |
SoPointerPosition::SoPointerPosition | ( | int | x, |
int | y | ||
) |
|
default |
|
inline |
Returns a pointer to additional position data.
There is no safe-guard here, but since the type of the additional data is very context specific, there should be no ambiguities. For example, for SoView2DExtension the data will always be View2DPosition.
Definition at line 93 of file SoPointerPosition.h.
References T.
|
inline |
Returns the Inventor action.
Definition at line 80 of file SoPointerPosition.h.
Referenced by SoCSODrawOnSurfaceDrawAction::isInViewportRegion(), and SoCSODrawOnSurfaceDrawAction::isSensitiveAt().
SoState* SoPointerPosition::getState | ( | ) | const |
Returns the Inventor state.
void SoPointerPosition::getValue | ( | int & | x, |
int & | y | ||
) | const |
Returns the position as two individual components.
|
inline |
Returns the additional data as View2DPosition. Legacy support, rather use get<View2DPosition>().
Definition at line 96 of file SoPointerPosition.h.
Referenced by CSOBulgeAction::isInViewportRegion().
bool SoPointerPosition::isNull | ( | ) | const |
Returns whether the stored position is the coordinate system's origin (0/0).
int SoPointerPosition::manhattanLength | ( | ) | const |
Returns the manhattan distance of this position to the coordinate system's origin.
SoPointerPosition& SoPointerPosition::operator= | ( | const SoPointerPosition & | u | ) |
Assignment operator.
|
inline |
Accesses the indexed component of the position vector.
Definition at line 68 of file SoPointerPosition.h.
|
inline |
Sets a pointer to additional position data, e.g., for SoView2D or SoDiagram2D.
Definition at line 87 of file SoPointerPosition.h.
SoPointerPosition& SoPointerPosition::setValue | ( | const int | v[2] | ) |
Sets the value of vector from array of two components.
SoPointerPosition& SoPointerPosition::setValue | ( | int | x, |
int | y | ||
) |
Sets the value of vector from two individual components.
|
inline |
Returns the x-component of this position.
Definition at line 54 of file SoPointerPosition.h.
|
inline |
Returns the y-component of this position.
Definition at line 56 of file SoPointerPosition.h.
|
friend |
Negated equality comparison operator.
Definition at line 76 of file SoPointerPosition.h.
|
friend |
Equality comparison operator.
|
friend |
Let only the SoInteractionHandler set the SoHandleEventAction on this position.
Definition at line 30 of file SoPointerPosition.h.