Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Gui::GizmoManager Class Reference

#include <Gui/Viewer/Gizmo/GizmoManager.hpp>

+ Inheritance diagram for Ra::Gui::GizmoManager:
+ Collaboration diagram for Ra::Gui::GizmoManager:

Public Types

enum  GizmoType { NONE , TRANSLATION , ROTATION , SCALE }
 

Public Slots

void setEditable (const Engine::Scene::ItemEntry &ent) override
 Set the object being currently edited.
 
void cleanup ()
 Destroy all gizmos.
 
void handlePickingResult (int drawableId)
 Callback when a drawable is picked.
 
void setLocal (bool useLocal)
 Change mode from local axis to global.
 
void changeGizmoType (GizmoType type)
 Change gizmo type (rotation or translation)
 
void updateValues () override
 Retrieve the transform from the editable and update the gizmos.
 

Public Member Functions

 GizmoManager (QObject *parent=nullptr)
 
virtual bool handleMousePressEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key, const Core::Asset::Camera &cam)
 Receive mouse events and transmit them to the gizmos.
 
virtual bool handleMouseReleaseEvent (QMouseEvent *event)
 
virtual bool handleMouseMoveEvent (QMouseEvent *event, const Qt::MouseButtons &buttons, const Qt::KeyboardModifiers &modifiers, int key, const Core::Asset::Camera &cam)
 

Friends

class KeyMappingManageable< GizmoManager >
 

Additional Inherited Members

- Static Public Member Functions inherited from Ra::Gui::KeyMappingManageable< GizmoManager >
static KeyMappingManager::Context getContext ()
 
static void configureKeyMapping ()
 
- Protected Member Functions inherited from Ra::Gui::KeyMappingManageable< GizmoManager >
GizmoManagerself ()
 
- Static Protected Member Functions inherited from Ra::Gui::KeyMappingManageable< GizmoManager >
static void setContext (const KeyMappingManager::Context &c)
 

Detailed Description

This class interfaces the gizmos with the ui commands. It allows to change the gizmo type when editing an editable transform object Note : currently the scale gizmo is not implemented so it will just return a null pointer

Definition at line 23 of file GizmoManager.hpp.

Member Enumeration Documentation

◆ GizmoType

enum Ra::Gui::GizmoManager::GizmoType

Definition at line 31 of file GizmoManager.hpp.

Constructor & Destructor Documentation

◆ GizmoManager()

Ra::Gui::GizmoManager::GizmoManager ( QObject * parent = nullptr)
explicit

Definition at line 56 of file GizmoManager.cpp.

Member Function Documentation

◆ changeGizmoType

void Ra::Gui::GizmoManager::changeGizmoType ( GizmoManager::GizmoType type)
slot

Change gizmo type (rotation or translation)

Definition at line 100 of file GizmoManager.cpp.

◆ cleanup

void Ra::Gui::GizmoManager::cleanup ( )
slot

Destroy all gizmos.

Definition at line 170 of file GizmoManager.cpp.

◆ handleMouseMoveEvent()

bool Ra::Gui::GizmoManager::handleMouseMoveEvent ( QMouseEvent * event,
const Qt::MouseButtons & buttons,
const Qt::KeyboardModifiers & modifiers,
int key,
const Core::Asset::Camera & cam )
virtual
Todo
what about if someone start a motion with a key, and then release it while moving the mouse ?

Definition at line 138 of file GizmoManager.cpp.

◆ handleMousePressEvent()

bool Ra::Gui::GizmoManager::handleMousePressEvent ( QMouseEvent * event,
const Qt::MouseButtons & buttons,
const Qt::KeyboardModifiers & modifiers,
int key,
const Core::Asset::Camera & cam )
virtual

Receive mouse events and transmit them to the gizmos.

Definition at line 114 of file GizmoManager.cpp.

◆ handleMouseReleaseEvent()

bool Ra::Gui::GizmoManager::handleMouseReleaseEvent ( QMouseEvent * event)
virtual

Definition at line 133 of file GizmoManager.cpp.

◆ handlePickingResult

void Ra::Gui::GizmoManager::handlePickingResult ( int drawableId)
slot

Callback when a drawable is picked.

Definition at line 162 of file GizmoManager.cpp.

◆ setEditable

void Ra::Gui::GizmoManager::setEditable ( const Engine::Scene::ItemEntry & ent)
overrideslot

Set the object being currently edited.

Definition at line 75 of file GizmoManager.cpp.

◆ setLocal

void Ra::Gui::GizmoManager::setLocal ( bool useLocal)
slot

Change mode from local axis to global.

Definition at line 95 of file GizmoManager.cpp.

◆ updateValues

void Ra::Gui::GizmoManager::updateValues ( )
overrideslot

Retrieve the transform from the editable and update the gizmos.

Definition at line 105 of file GizmoManager.cpp.

Friends And Related Symbol Documentation

◆ KeyMappingManageable< GizmoManager >

friend class KeyMappingManageable< GizmoManager >
friend

Definition at line 23 of file GizmoManager.hpp.


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