Manipulator (interface)

バージョン 1.12.0 で追加.

The Manipulator interface for all manipulators. A custom manipulator supporting the Manipulator must implement the functions defined in the interface. How a manipulator interprets and processed the events from the host application is completely down to the implementation of the onEvent function.

A wide range of custom manipulators are possible with this design, and there are a collection of example manipulators provided to show how they can be implemented.

参考

EventDispatcher, RTREventDispatcher, SRTManipulator

/*
** Example: MyCustomManipulator
*/

EventDispatcher dispatcher = EventDispatcher_GetInstance(); Manipulator manipulator = MyCustomManipulator();

// register the manipulator under the name ‘MoveTool’ dispatcher.registerManipulator(“MoveTool”, manipulator);

Manipulator Manipulator Manipulator CameraManipulator CameraManipulator CameraManipulator->Manipulator GizmoManipulator GizmoManipulator GizmoManipulator->Manipulator TransformManipulator TransformManipulator TransformManipulator->GizmoManipulator SurfacePaintManipulator SurfacePaintManipulator SurfacePaintManipulator->Manipulator SurfaceAttributePaintManipulator SurfaceAttributePaintManipulator SurfaceAttributePaintManipulator->SurfacePaintManipulator SurfaceSculptManipulator SurfaceSculptManipulator SurfaceSculptManipulator->SurfacePaintManipulator

Functions

  onDisable ! ()
  onEnable ! ()
  onEvent ! ( io Event event )

Functions in detail

Manipulator.onDisable! ()

Called when this manipulator is disabled. The manipulator can peform cleanpup, such as removeing onscreen icons, paint brushes etc...


Manipulator.onEnable! ()

Called when this manipulator is enabled. It should prepare for action. Some manipulators might start drawing online gizmos to indicate that they are active.


Manipulator.onEvent! ( io Event event )

Event propagation to the active manipulator.