|
Rumba C++ SDK
|
Derive this class to create your own Manipulator type. More...
#include <ManipulatorPlugin.h>
Public Types | |
| enum | Space { Space::world, Space::parent, Space::object, Space::view } |
| enum | Axis { Axis::x, Axis::y, Axis::z, Axis::mx, Axis::my, Axis::mz } |
Public Member Functions | |
| ManipulatorPlugin (Node *node) | |
| Node | controller (const char *ctrl_name) const |
| virtual Node | default_controller () |
| void | add_controller_cache_dependency (const Plug &plug) |
| void | remove_controller_cache_dependency (const Plug &plug) |
| virtual void | on_mouse_press (const CameraContext &camera, const InteractionContext &interaction) |
| virtual void | on_mouse_move (const CameraContext &camera, const InteractionContext &interaction) |
| virtual void | on_mouse_release (const CameraContext &camera, const InteractionContext &interaction) |
| virtual std::string | get_cursor () |
| virtual Array | get_help (const char *tool) |
| virtual Array | get_status (const char *tool) |
| std::shared_ptr< maquina::NodeDelegate > | node_delegate () const override |
| Return a node delegate for this node. More... | |
Public Member Functions inherited from maquina::NodePlugin | |
| NodePlugin (Node *node) | |
| virtual | ~NodePlugin () |
| virtual void | on_first_init (bool) |
| Perform the one shot initialization tasks for this node. More... | |
| virtual void | on_delete (bool) |
| Prepare the node to be deleted. More... | |
| virtual void | on_add_to_document () |
| Callback called when the node is added to the document. More... | |
| virtual void | on_remove_from_document () |
| Callback called when the node is removed from the document. More... | |
| virtual void | on_input_connection (const Plug &, const Plug &, bool) |
| Callback called when an a connection has been done between an output plug and a plug of this node as input. More... | |
| virtual void | on_output_connection (const Plug &, const Plug &, bool) |
| Callback called when an a connection has been done between a plug of this node as output and an input plug. More... | |
| virtual void | on_input_disconnection (const Plug &, const Plug &) |
| Callback called when an a connection has been broken between an output plug and a plug of this node as input. More... | |
| virtual void | on_output_disconnection (const Plug &, const Plug &) |
| Callback called when an a connection has been broken between a plug of this node as output and an input plug. More... | |
| virtual void | relationship (NodeSet &set) const |
| Return the node relationships. More... | |
| Node | node () const |
| Returns the Node interface for this object. More... | |
| virtual std::string | selection_path () const |
| Returns the node delegate path to use to select that node. More... | |
Static Public Member Functions | |
| static float | float_controller (const Imath::V2i &original_pos, const Imath::V2i &pos, int modifiers, float original_value, float slider_min=0.f, float slider_max=1.f, float min=-FLT_MAX, float max=FLT_MAX, float mouse_range=500.f) |
| static void | translate_controller (const std::shared_ptr< maquina::NodeDelegate > &nd, const Imath::V3d &delta_world, const Imath::M44d &initial_matrix, const Imath::M44d &initial_world_matrix, float frame, bool use_current_parent_matrix=false) |
| static Imath::V3d | translate_controller (const Imath::V3d &initial_world_position, const Imath::M44d &original_ctrl_matrix, const CameraContext &camera, const Imath::V2i &original_pos, float original_depth, const Imath::V2i &pos, int modifiers, Space space, const char *mode) |
| static Imath::V3d | translate_view (const Imath::V3d &initial_world_position, const CameraContext &camera, const Imath::V2i &original_pos, float original_depth, const Imath::V2i &pos, int modifiers) |
| static Imath::V3d | translate_plane (const Imath::M44d &original_ctrl_matrix, const CameraContext &camera, const Imath::V2i &original_pos, float original_depth, const Imath::V2i &pos, int modifiers, const Imath::V3d &_plane_normal, Space space) |
| static Imath::V3d | translate_axis (const Imath::M44d &original_ctrl_matrix, const CameraContext &camera, const Imath::V2i &original_pos, float original_depth, const Imath::V2i &pos, const Imath::V3d &axis, Space space) |
| static void | rotate_controller (const std::shared_ptr< maquina::NodeDelegate > &nd, const Imath::V3d &axis, double angle, Space space, const Imath::M44d &initial_matrix, const Imath::M44d &initial_world_matrix, float frame) |
| static void | rotate_gimbal_controller (Node &controller, const Imath::V3d &gimbal, const Imath::V3d &original) |
| static Imath::Quatd | rotate_controller (int &lock_axis, int &major_axis, const char *&cursor, const Imath::V3d &initial_world_position, const Imath::M44d &original_ctrl_matrix, const CameraContext &camera, const Imath::V2i &original_pos, float original_depth, const Imath::V2i &pos, int modifiers, int nd_flags, float angle_speed=0.01f) |
| static const Imath::M44d | to_world (Space space, const Imath::M44d &object, const Imath::M44d &world) |
| static const Imath::V3d & | axis (Axis axis) |
| static Imath::V3d | axis (const Imath::M44d &matrix, Axis axis) |
| static Array | rotate_help (const char *rotate_mode) |
| static Array | translate_help (const char *rotate_mode) |
Derive this class to create your own Manipulator type.
|
strong |
|
strong |
|
inline |
| void maquina::ManipulatorPlugin::add_controller_cache_dependency | ( | const Plug & | plug | ) |
Add a dependence to the controller cache.
In order to speed up the fetch of controllers from manipulators, a cache is built internally. This cache stores the result of default_controller() methods. If your implementation of default_controller() uses the values of a plug, you must call the following method with that plug, such that the cache is invalidated on a change in this plug.
This method is typically called in on_add_to_document() overrides or in functions used inside default_controller() overrides.
|
static |
|
static |
| Node maquina::ManipulatorPlugin::controller | ( | const char * | ctrl_name | ) | const |
|
virtual |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
overridevirtual |
Return a node delegate for this node.
This method is called by the host. Return nullptr if the default implementation should be used.
Reimplemented from maquina::NodePlugin.
|
virtual |
|
virtual |
|
virtual |
| void maquina::ManipulatorPlugin::remove_controller_cache_dependency | ( | const Plug & | plug | ) |
Remove a dependence to the controller cache.
Remove a dependence of the controller cache added by a call to add_controller_cache_dependency(). This method is typically called in on_add_to_document() overrides or in functions used inside default_controller() overrides.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |