gz/rendering/TransformController.hh
Go to the documentation of this file.
An transform tool for translating, rotating, and scaling objects.
Definition: gz/rendering/TransformController.hh:47
std::unique_ptr< TransformControllerPrivate > dataPtr
Private data pointer.
Definition: gz/rendering/TransformController.hh:217
virtual ~TransformController()
Destructor.
math::Quaterniond RotationFrom2d(const math::Vector3d &_axis, const math::Vector2d &_start, const math::Vector2d &_end)
Helper function to compute 3d rotation from 2d translation movement. Useful for converting 2d mouse d...
virtual CameraPtr Camera() const
get the camera that is controlled by this view controller.
math::Vector3d TranslationFrom2d(const math::Vector3d &_axis, const math::Vector2d &_start, const math::Vector2d &_end)
Helper function to compute 3d translation from 2d translation movement. Useful for converting 2d mous...
virtual void SetTransformSpace(TransformSpace _space)
Set the transform space.
virtual bool Active() const
Check if the transform process is active.
virtual void Rotate(const math::Quaterniond &_rotation, bool _snap=false)
Rotate the attached node.
virtual void Translate(const math::Vector3d &_translation, bool _snap=false)
Translate the attached node.
virtual math::Vector3d AxisById(unsigned int _id) const
Get the axis of transform represented by the given node id.
virtual TransformMode Mode() const
Get the current transform mode.
virtual void SetActiveAxis(const math::Vector3d &_axis)
Set the active transform axis. This highlights the axis visual.
static gz::math::Vector3d SnapPoint(const gz::math::Vector3d &_point, const double _interval=1.0, const double _sensitivity=0.4)
Snap a point at intervals of a fixed distance. Currently used to give a snapping behavior when transf...
virtual void SetCamera(const CameraPtr &_camera)
Set the camera.
bool RayPlaneIntersection(RayQueryPtr _ray, const math::Planed &_plane, math::Vector3d &_result)
Helper function to compute ray plane intersection.
virtual void Detach()
Detach the transform controller from the currently attached node.
virtual void Start()
Start the transform process. To be used with helper functions that computions transforms from 2d move...
virtual void Scale(const math::Vector3d &_scale, bool _snap=false)
Scale the attached node.
math::Planed CreatePlaneForTransform(const math::Vector3d &_axis, const math::Vector2d &_pt2d)
Helper function to create a plane for transfomation. The plane is chosen based on the current transfo...
virtual math::Vector3d ActiveAxis() const
Get the current highlighted active axis of transform.
virtual TransformSpace Space() const
Get the transform space.
virtual void Attach(NodePtr _node)
Attach the transform controller to the specified node.
static math::Vector3d ToAxis(TransformAxis _axis)
Convert a TransformAxis to a vector type.
math::Vector3d ScaleFrom2d(const math::Vector3d &_axis, const math::Vector2d &_start, const math::Vector2d &_end)
Helper function to compute 3d scale from 2d translation movement. Useful for converting 2d mouse drag...
virtual void Stop()
Stop the transform process. To be used with helper functions that computions transforms from 2d movem...
virtual void Update()
Update the transform controller. Its visual is updated based on the current transform mode,...
virtual void SetTransformMode(TransformMode _mode)
Set the transform mode.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
TransformAxis
Unique identifiers for transformation axes.
Definition: gz/rendering/TransformType.hh:35
TransformSpace
Unique identifiers for transformation spaces.
Definition: gz/rendering/TransformType.hh:75
TransformMode
Unique identifiers for transformation modes.
Definition: gz/rendering/TransformType.hh:61