|
Katana Plug-in APIs 0.1
|
A handle to scale the selected object along an axis. More...
#include <FnGLScaleAxisHandle.h>
Public Member Functions | |
| GLScaleAxisHandle () | |
| Constructor. | |
| virtual | ~GLScaleAxisHandle () |
| Destructor. | |
| void | draw () |
| void | pickerDraw (int64_t pickerId) |
| void | setup (const IMATH_NAMESPACE::V3d &axis) |
| Initializes the axis and meshes. Called at handle creation. | |
|
virtual FnKat::ViewerUtils::Orientation | getOrientation () |
| Forces the handle to only use object space orientation. | |
Static Public Member Functions | |
|
static Foundry::Katana::ViewerAPI::ManipulatorHandle * | create () |
| Creates a new instance of GLScaleAxisHandle. | |
| 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) |
A handle to scale the selected object along an axis.
This class represents a single handle that can be used to scale an object along a specified direction axis vector. The handle is represented by a line and a cube. The handle will be deformed while dragging, showing how much scaling is being applied. A ghost version of the initial handle scaling will also be shown so that the user can easily compare the current scaling with the original at drag start.
The handle's position will depend on the transform order. For example, if the translation is applied before the scale, then the handles will be placed away from the object's origin, since the scaling will pivot around that point away from the origin.
If a rotation is applied after the scaling, then the handles' orientation can be deformed in non-uniform scalings, but the 3 axis will always be orthogonal to each other.
| void GLScaleAxisHandle::applyXformToLocation | ( | const std::string & | locationPath, |
| const IMATH_NAMESPACE::M44d & | xform, | ||
| bool | isFinal | ||
| ) | [protected, virtual] |
Applies the given scale transform to the given location.
Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLScaleAxisHandle::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 scale and applies it to all the manipulated locations.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLScaleAxisHandle::draw | ( | ) | [virtual] |
Draws the handle.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| void GLScaleAxisHandle::endDrag | ( | ) | [protected, virtual] |
Callback received when the drag action ends.
Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
| virtual std::string GLScaleAxisHandle::getComponentName | ( | ) | [inline, protected, virtual] |
The transform component: xform.interactive.scale
Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.
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.
| void GLScaleAxisHandle::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 GLScaleAxisHandle::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