Radium Engine  1.5.0
Ra::Gui::TranslateGizmo Class Reference

A TranslateGizmo manipulates the translational part of a transformation. More...

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

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

Public Member Functions

 TranslateGizmo (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
EIGEN_MAKE_ALIGNED_OPERATOR_NEW 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 TranslateGizmo manipulates the translational part of a transformation.

Definition at line 11 of file TranslateGizmo.hpp.

Member Function Documentation

◆ mouseMove()

Core::Transform Ra::Gui::TranslateGizmo::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 137 of file TranslateGizmo.cpp.

◆ setInitialState()

void Ra::Gui::TranslateGizmo::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 183 of file TranslateGizmo.cpp.


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