|
Katana Plug-in APIs 0.1
|
A handle to translate the selected object along an axis. More...
#include <FnGLTranslateAxisHandle.h>
Public Member Functions | |
| GLTranslateAxisHandle () | |
| Constructor. | |
| virtual | ~GLTranslateAxisHandle () |
| Destructor. | |
| void | draw () |
| void | pickerDraw (int64_t pickerId) |
| void | setup (const IMATH_NAMESPACE::V3d &axis) |
| Initializes the axis and meshes. Called at handle creation. | |
Static Public Member Functions | |
|
static Foundry::Katana::ViewerAPI::ManipulatorHandle * | create () |
| Creates a new instance of GLTranslateAxisHandle. | |
| static void | flush () |
| Flushes any cached data. | |
Protected Member Functions | |
| virtual std::string | getComponentName () |
| bool | getDraggingPlane (Vec3d &origin, Vec3d &normal) |
| void | startDrag (const Vec3d &initialPointOnPlane, const Vec2i &initialMousePosition) |
| void | endDrag () |
| void | drag (const Vec3d &initialPointOnPlane, const Vec3d &previousPointOnPlane, const Vec3d ¤tPointOnPlane, const Vec2i &initialMousePosition, const Vec2i &previousMousePosition, const Vec2i ¤tMousePosition, bool isFinal) |
| void | applyXformToLocation (const std::string &locationPath, const IMATH_NAMESPACE::M44d &xform, bool isFinal) |
| virtual IMATH_NAMESPACE::M44d | getOrientationXform (const std::string &locationPath) |
| virtual void | calculateAndSetLocalXform (const std::string &locationPath) |
A handle to translate the selected object along an axis.
This class represents a single handle that can be used to translate an object along a specified direction axis vector. The handle is represented by a line and an arrow head. The handle will be translated while dragging. A ghost version of the initial handle will also be shown so that the user can easily compare the current translation with the original at drag start.
The handle's position will always be at the object's origin.
| void GLTranslateAxisHandle::applyXformToLocation | ( | const std::string & | locationPath, |
| const IMATH_NAMESPACE::M44d & | xform, | ||
| bool | isFinal | ||
| ) | [protected, virtual] |
Applies the given translation transform to the given location.
Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| virtual void GLTranslateAxisHandle::calculateAndSetLocalXform | ( | const std::string & | locationPath | ) | [protected, virtual] |
Overridden to include the translation component as part of getting the current xform.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLTranslateAxisHandle::drag | ( | const Vec3d & | initialPointOnPlane, |
| const Vec3d & | previousPointOnPlane, | ||
| const Vec3d & | currentPointOnPlane, | ||
| const Vec2i & | initialMousePosition, | ||
| const Vec2i & | previousMousePosition, | ||
| const Vec2i & | currentMousePosition, | ||
| bool | isFinal | ||
| ) | [protected, virtual] |
Detects the amount of translation and applies it to all the manipulated locations.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLTranslateAxisHandle::draw | ( | ) | [virtual] |
Draws the handle.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLTranslateAxisHandle::endDrag | ( | ) | [protected, virtual] |
Callback received when the drag action ends.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| virtual std::string GLTranslateAxisHandle::getComponentName | ( | ) | [inline, protected, virtual] |
The transform component: xform.interactive.translate
Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| bool GLTranslateAxisHandle::getDraggingPlane | ( | Vec3d & | origin, |
| Vec3d & | normal | ||
| ) | [protected, virtual] |
Gets the dragging plane's origin and normal. The origin is always the same as the in whole manipulator and the normal is given by the ray from the camera's origin through the latest mouse coordinates.
Reimplemented from Foundry::Katana::ViewerUtils::GLManipulatorHandle.
| virtual IMATH_NAMESPACE::M44d GLTranslateAxisHandle::getOrientationXform | ( | const std::string & | locationPath | ) | [protected, virtual] |
Overridden to use the initial orientation when the drag action has started.
When the manipulation has started, we want to use the initial orientation, so that manipulators whose translate operation imply an orientation change do not get affected (i.e. the COI manipulators).
For the standard Translate manipulator this makes no difference, as the orientation never changes.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLTranslateAxisHandle::pickerDraw | ( | int64_t | pickerId | ) | [virtual] |
Draws the manipulator with a specific selection picker ID. Typically this ID is converted to a color value, and the handle is then drawn with flat shading, so it can be identified in a look-up table.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLTranslateAxisHandle::startDrag | ( | const Vec3d & | initialPointOnPlane, |
| const Vec2i & | initialMousePosition | ||
| ) | [protected, virtual] |
Initializes some initial values at drag start.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
1.7.3