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

A RotateGizmo manipulates the rotational part of a transformation. More...

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

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

Public Member Functions

 RotateGizmo (Engine::Scene::Component *c, const Core::Transform &worldTo, const Core::Transform &t, Mode mode)
 
void updateTransform (Gizmo::Mode mode, const Core::Transform &worldTo, const Core::Transform &t) override
 Called every time the underlying transform may have changed.
 
void selectConstraint (int drawableIndex) override
 Called when one of the drawables of the gizmo has been selected.
 
bool isSelected () override
 return the selection state of the gizmo: true if the gizmo is selected, false if not.
 
void setInitialState (const Core::Asset::Camera &cam, const Core::Vector2 &initialXY) override
 
Core::Transform mouseMove (const Core::Asset::Camera &cam, const Core::Vector2 &nextXY, bool stepped, bool whole) override
 
- Public Member Functions inherited from Ra::Gui::Gizmo
 Gizmo (Engine::Scene::Component *c, const Core::Transform &worldTo, const Core::Transform &t, Mode mode)
 
void show (bool on)
 

Additional Inherited Members

- Public Types inherited from Ra::Gui::Gizmo
enum  Mode { LOCAL , GLOBAL }
 
- Protected Member Functions inherited from Ra::Gui::Gizmo
const std::vector< Engine::Rendering::RenderObject * > & ros () const
 read access to the gizmo render objects id
 
void addRenderObject (Engine::Rendering::RenderObject *ro)
 add a render object to display the Gizmo
 
Gizmo::UiSelectionControlergetControler (int ro)
 Returns the controler (ShaderParametersProvider) associated to the given gizmo component.
 
- Static Protected Member Functions inherited from Ra::Gui::Gizmo
static bool findPointOnAxis (const Core::Asset::Camera &cam, const Core::Vector3 &origin, const Core::Vector3 &axis, const Core::Vector2 &pix, Core::Vector3 &pointOut, std::vector< Scalar > &hits)
 Find a mouse-designed point on a 3D axis.
 
static bool findPointOnPlane (const Core::Asset::Camera &cam, const Core::Vector3 &origin, const Core::Vector3 &axis, const Core::Vector2 &pix, Core::Vector3 &pointOut, std::vector< Scalar > &hits)
 Find a mouse-designed point on a 3D plane.
 
static std::shared_ptr< Engine::Rendering::RenderTechniquemakeRenderTechnique (int color)
 
- Protected Attributes inherited from Ra::Gui::Gizmo
Core::Transform m_worldTo
 World to local space where the transform lives.
 
Core::Transform m_transform
 Transform to be edited.
 
Engine::Scene::Componentm_comp
 Engine Ui component.
 
Mode m_mode
 local or global.
 
- Static Protected Attributes inherited from Ra::Gui::Gizmo
static std::array< std::shared_ptr< Ra::Engine::Data::PlainMaterial >, 3 > s_material
 

Detailed Description

A RotateGizmo manipulates the rotational part of a transformation.

Definition at line 11 of file RotateGizmo.hpp.

Constructor & Destructor Documentation

◆ RotateGizmo()

Ra::Gui::RotateGizmo::RotateGizmo ( Engine::Scene::Component * c,
const Core::Transform & worldTo,
const Core::Transform & t,
Mode mode )

Definition at line 16 of file RotateGizmo.cpp.

Member Function Documentation

◆ isSelected()

bool Ra::Gui::RotateGizmo::isSelected ( )
inlineoverridevirtual

return the selection state of the gizmo: true if the gizmo is selected, false if not.

Implements Ra::Gui::Gizmo.

Definition at line 24 of file RotateGizmo.hpp.

◆ mouseMove()

Core::Transform Ra::Gui::RotateGizmo::mouseMove ( const Core::Asset::Camera & cam,
const Core::Vector2 & nextXY,
bool stepped,
bool whole )
overridevirtual

Called when the mouse movement is recorder with the camera parameters and the current pixel coordinates.

Implements Ra::Gui::Gizmo.

Definition at line 88 of file RotateGizmo.cpp.

+ Here is the call graph for this function:

◆ selectConstraint()

void Ra::Gui::RotateGizmo::selectConstraint ( int drawableIndex)
overridevirtual

Called when one of the drawables of the gizmo has been selected.

Implements Ra::Gui::Gizmo.

Definition at line 69 of file RotateGizmo.cpp.

+ Here is the call graph for this function:

◆ setInitialState()

void Ra::Gui::RotateGizmo::setInitialState ( const Core::Asset::Camera & cam,
const Core::Vector2 & initialXY )
overridevirtual

Called when the gizmo is first clicked, with the camera parameters and the initial pixel coordinates.

Implements Ra::Gui::Gizmo.

Definition at line 170 of file RotateGizmo.cpp.

◆ updateTransform()

void Ra::Gui::RotateGizmo::updateTransform ( Gizmo::Mode mode,
const Core::Transform & worldTo,
const Core::Transform & t )
overridevirtual

Called every time the underlying transform may have changed.

Implements Ra::Gui::Gizmo.

Definition at line 48 of file RotateGizmo.cpp.


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