33 #if !defined(ICL_HAVE_OPENGL) || !defined(ICL_HAVE_QT) 35 #pragma WARNING("this header must not be included if ICL_HAVE_OPENGL or ICL_HAVE_QT is not defined") 37 #warning "this header must not be included if ICL_HAVE_OPENGL or ICL_HAVE_QT is not defined" 180 *
this = pSceneMouseHandler;
207 const float pMouse = 1.0,
const float pWheel = 0.001,
208 const float pModifier = 10.0 );
249 const bool pLeftMouseButton,
250 const bool pMiddleMouseButton,
251 const bool pRightMouseButton,
274 bool pInverseX,
bool pInverseY);
289 freeView( pMouseEvent, pCurrentMousePosition, pDeltaMousePosition, pCamera, pScene, pData,
false,
false );
305 freeView( pMouseEvent, pCurrentMousePosition, pDeltaMousePosition, pCamera, pScene, pData,
true,
false );
321 freeView( pMouseEvent, pCurrentMousePosition, pDeltaMousePosition, pCamera, pScene, pData,
false,
true );
338 freeView( pMouseEvent, pCurrentMousePosition, pDeltaMousePosition, pCamera, pScene, pData,
true,
true );
static void freeViewInverseMouseY(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Free view with inversed y-axis.
Definition: SceneMouseHandler.h:317
Definition: SceneMouseHandler.h:101
float mMouse
sensitivity of mouse movements (e.g. 1.0)
Definition: SceneMouseHandler.h:92
void setParentScene(Scene *pParentScene)
Set parent scene.
Definition: SceneMouseHandler.h:190
Class providing a mouse handler for class scene.
Definition: SceneMouseHandler.h:136
undocument this line if you encounter any issues!
Definition: Any.h:37
Scene * getParentScene()
Get parent scene.
Definition: SceneMouseHandler.h:195
Main Class of ICL's GUI creation framework.
Definition: GUI.h:60
Camera mCameraBackup
backup of old camera
Definition: SceneMouseHandler.h:152
static ICLGeom_API void placeCursor(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Place the cursor for rotational Origin.
int getCameraIndex()
Get camera index.
Definition: SceneMouseHandler.h:228
int mKeyboardModifiersBackup
backup of old keyboard modifiers
Definition: SceneMouseHandler.h:164
static ICLGeom_API void rotateAroundOrigin(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Rotate around origin and correct camera orientation.
MouseEventType
list of supported mouse event types
Definition: MouseEvent.h:48
static void freeView(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Free view with normal axes.
Definition: SceneMouseHandler.h:285
#define ICLGeom_API
Definition: CompatMacros.h:179
SceneMouseHandler(const SceneMouseHandler &pSceneMouseHandler)
Copy constructor.
Definition: SceneMouseHandler.h:179
Scene * mParentScene
pointer to parent scene
Definition: SceneMouseHandler.h:158
static ICLGeom_API void rollAndDistance(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Roll and distance (camera movement forward and backward).
mouse mapping table entry
Definition: SceneMouseHandler.h:74
utils::Point32f mAnchor
starting mouse position for dragging
Definition: SceneMouseHandler.h:155
static ICLGeom_API void strafe(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Strafe (camera movement up, down, left, right).
Camera class.
Definition: Camera.h:132
virtual ICLGeom_API void setMouseMappings()
Set mouse mappings.
static ICLGeom_API void freeView(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData, bool pInverseX, bool pInverseY)
Free view.
ICLGeom_API ~SceneMouseHandler()
Destructor.
Scene Implementation that is used to handle a list of objects and cameras.
Definition: Scene.h:138
Definition: SceneMouseHandler.h:103
static void freeViewInverseBoth(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Free view with inversed axes.
Definition: SceneMouseHandler.h:334
Definition: SceneMouseHandler.h:102
MouseEvent Handler.
Definition: MouseHandler.h:92
void * mData
pointer to additional data
Definition: SceneMouseHandler.h:79
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
Definition: SceneMouseHandler.h:104
int mCameraIndex
index of camera in scene
Definition: SceneMouseHandler.h:161
highest enum value (enum value count = MAX_MOUSE_EVENT + 1)
Definition: MouseEvent.h:56
Provided by interface MouseGrabber.
Definition: MouseEvent.h:86
MouseSensitivities getSensitivities(MouseSensitivitiesModifier pMouseSensitivitiesModifier)
Get mouse and wheel sensitivities (low, normal, high).
Definition: SceneMouseHandler.h:213
float mWheel
sensitivity of mouse wheel (e.g. 0.001)
Definition: SceneMouseHandler.h:95
ICLGeom_API void setSensitivities(const float pTranslation, const float pRotation=1.0, const float pMouse=1.0, const float pWheel=0.001, const float pModifier=10.0)
Set mouse & wheel sensitivities, modifier factor and factors for rotation and translation.
virtual ICLGeom_API void process(const qt::MouseEvent &pMouseEvent)
Process mouse event using mouse mapping table.
MouseMappingTableEntry mMouseMappingTable[qt::MAX_MOUSE_EVENT+1][2][2][2][2][2][2]
Mouse mapping table:
Definition: SceneMouseHandler.h:146
void setCameraIndex(const int pCameraIndex)
Set camera index.
Definition: SceneMouseHandler.h:221
qt::GUI * mGUI
GUI for the adaption of scene properties.
Definition: SceneMouseHandler.h:167
MouseActionCallback mMouseAction
pointer to mouse action function
Definition: SceneMouseHandler.h:76
void(* MouseActionCallback)(const qt::MouseEvent &, const utils::Point32f &, const utils::Point32f &, Camera &, Scene &, void *)
Mouse action function pointer.
Definition: SceneMouseHandler.h:68
MouseSensitivitiesModifier
mouse sensitivities modifier
Definition: SceneMouseHandler.h:100
MouseSensitivities mMouseSensitivities[MAX_MOUSE_SENSITIVITY+1]
mouse sensitivities
Definition: SceneMouseHandler.h:149
float mRotation
sensitivity factor for rotations (e.g. 1.0)
Definition: SceneMouseHandler.h:89
float mTranslation
sensitivity factor for translation (e.g. mParentScene->getMaxSceneDim())
Definition: SceneMouseHandler.h:86
mouse sensitivities
Definition: SceneMouseHandler.h:84
ICLGeom_API SceneMouseHandler(const int pCameraIndex, Scene *pParentScene)
Constructor.
static void freeViewInverseMouseX(const qt::MouseEvent &pMouseEvent, const utils::Point32f &pCurrentMousePosition, const utils::Point32f &pDeltaMousePosition, Camera &pCamera, Scene &pScene, void *pData)
Free view with inversed x-axis.
Definition: SceneMouseHandler.h:301
ICLGeom_API SceneMouseHandler & operator=(const SceneMouseHandler &pSceneMouseHandler)
Assignment operator.
ICLGeom_API void setMouseMapping(const qt::MouseEventType pMouseEventType, const bool pLeftMouseButton, const bool pMiddleMouseButton, const bool pRightMouseButton, const bool pShift, const bool pControl, const bool pAlt, MouseActionCallback pMouseActionCallback, void *pData=0)
Set one mouse mapping.