OpenWalnut
1.3.1
|
Encapsulates info for pick action. More...
#include <WPickInfo.h>
Public Types | |
enum | modifierKey { NONE, SHIFT, STRG, ALT, WIN } |
Different types of modifier keys. More... | |
enum | WMouseButton { NOMOUSE, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE, MOUSE4, MOUSE5 } |
Different types of mouse buttons. More... | |
Public Member Functions | |
WPickInfo (std::string name, std::string viewerName, WPosition pickPosition, std::pair< float, float > pixelCoords, modifierKey modKey, WMouseButton mButton=WPickInfo::MOUSE_LEFT, WVector3d pickNormal=WVector3d(), int32_t wheelValue=0) | |
Creates an object with the needed information. More... | |
WPickInfo () | |
Creates an object with the empty name, zero position and no modkey. More... | |
modifierKey | getModifierKey () const |
Get the modifier key associated with the pick. More... | |
WMouseButton | getMouseButton () const |
Get the mouse button associated with the pick. More... | |
void | setModifierKey (const modifierKey &modKey) |
Set the modifier key associated with the pick. More... | |
void | setMouseButton (const WMouseButton &mButton) |
Set the modifier key associated with the pick. More... | |
std::string | getName () const |
Get name of picked object. More... | |
std::string | getViewerName () const |
Get name of the viewer. More... | |
WPosition | getPickPosition () const |
Get position where object was hit. More... | |
WVector3d | getPickNormal () const |
Get normal at position where object was hit. More... | |
WVector2d | getPickPixel () const |
Returns the picked pixel coordinates in screen-space. More... | |
int32_t | getScrollWheel () const |
Returns an integer denoting the wheel movement. More... | |
bool | operator== (WPickInfo rhs) const |
Tests two pick infos for equality. More... | |
bool | operator!= (WPickInfo rhs) const |
Tests two pick infos for inequality. More... | |
Private Attributes | |
std::string | m_name |
name of picked object. More... | |
std::string | m_viewerName |
name of the viewer More... | |
WPosition | m_pickPosition |
position where object was hit. More... | |
std::pair< float, float > | m_pixelCoords |
Pixel coordinates of the mouse. More... | |
modifierKey | m_modKey |
modifier key associated with the pick More... | |
WMouseButton | m_mouseButton |
which mouse button was used for the pick More... | |
WVector3d | m_pickNormal |
normal at position where object was hit. More... | |
int32_t | m_scrollValue |
the scroll wheel value. More... | |
Encapsulates info for pick action.
Definition at line 40 of file WPickInfo.h.
Different types of modifier keys.
Definition at line 46 of file WPickInfo.h.
Different types of mouse buttons.
Definition at line 58 of file WPickInfo.h.
|
inline |
Creates an object with the needed information.
name | name of picked object |
viewerName | name of the viewer |
pickPosition | position where object was hit |
pixelCoords | pixel coordinates of the mouse |
modKey | relevant modifier key pressed during the pick |
mButton | mouse button that initiated the pick |
pickNormal | normal at position where object was hit. (0,0,0) means not set. |
wheelValue | the value of the scroll wheel |
Definition at line 192 of file WPickInfo.h.
|
inline |
Creates an object with the empty name, zero position and no modkey.
Definition at line 211 of file WPickInfo.h.
|
inline |
Get the modifier key associated with the pick.
Definition at line 222 of file WPickInfo.h.
References m_modKey.
Referenced by WPickHandler::pick(), WROIBox::updateGFX(), and WROISphere::updateGFX().
|
inline |
Get the mouse button associated with the pick.
Definition at line 232 of file WPickInfo.h.
References m_mouseButton.
|
inline |
Get name of picked object.
Definition at line 242 of file WPickInfo.h.
References m_name.
Referenced by WPickHandler::pick(), WROIBox::updateGFX(), and WROISphere::updateGFX().
|
inline |
Get normal at position where object was hit.
Definition at line 257 of file WPickInfo.h.
References m_pickNormal.
Referenced by WPickHandler::pick(), and WROIBox::updateGFX().
|
inline |
Returns the picked pixel coordinates in screen-space.
Definition at line 274 of file WPickInfo.h.
References m_pixelCoords.
Referenced by WROIBox::updateGFX(), and WROISphere::updateGFX().
|
inline |
Get position where object was hit.
Definition at line 252 of file WPickInfo.h.
References m_pickPosition.
Referenced by WPickHandler::pick().
|
inline |
Returns an integer denoting the wheel movement.
If the value gets smaller, the wheel scrolled down.
Definition at line 282 of file WPickInfo.h.
References m_scrollValue.
Referenced by WROIBox::updateGFX().
|
inline |
Get name of the viewer.
Definition at line 247 of file WPickInfo.h.
References m_viewerName.
|
inline |
Tests two pick infos for inequality.
rhs | right hand side of comparison |
Definition at line 269 of file WPickInfo.h.
|
inline |
Tests two pick infos for equality.
rhs | right hand side of comparison |
Definition at line 262 of file WPickInfo.h.
References m_modKey, m_name, and m_pickPosition.
|
inline |
Set the modifier key associated with the pick.
modKey | new modifier key |
Definition at line 227 of file WPickInfo.h.
References m_modKey.
Referenced by WPickHandler::updatePickInfoModifierKeys().
|
inline |
Set the modifier key associated with the pick.
mButton | new mouse button |
Definition at line 237 of file WPickInfo.h.
References m_mouseButton.
|
private |
modifier key associated with the pick
Definition at line 186 of file WPickInfo.h.
Referenced by getModifierKey(), operator==(), and setModifierKey().
|
private |
which mouse button was used for the pick
Definition at line 187 of file WPickInfo.h.
Referenced by getMouseButton(), and setMouseButton().
|
private |
name of picked object.
Definition at line 182 of file WPickInfo.h.
Referenced by getName(), and operator==().
|
private |
normal at position where object was hit.
Definition at line 188 of file WPickInfo.h.
Referenced by getPickNormal().
|
private |
position where object was hit.
Definition at line 184 of file WPickInfo.h.
Referenced by getPickPosition(), and operator==().
|
private |
Pixel coordinates of the mouse.
Definition at line 185 of file WPickInfo.h.
Referenced by getPickPixel().
|
private |
|
private |