Katana Plug-in APIs 0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions

GLTranslateScreenPlaneHandle Class Reference

Inheritance diagram for GLTranslateScreenPlaneHandle:
Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle Foundry::Katana::ViewerUtils::GLManipulatorHandle Foundry::Katana::ViewerAPI::ManipulatorHandle Foundry::Katana::ViewerAPI::ManipulatorHandlePluginBase

List of all members.

Public Member Functions

 GLTranslateScreenPlaneHandle ()
 Constructor.
virtual ~GLTranslateScreenPlaneHandle ()
 Destructor.
void draw ()
void pickerDraw (int64_t pickerId)
void setup ()
 Initializes the axis and meshes. Called at handle creation.
virtual
Foundry::Katana::ViewerUtils::Orientation 
getOrientation ()
 Defines the orientation space of the manipulator.

Static Public Member Functions

static
Foundry::Katana::ViewerAPI::ManipulatorHandle
create ()
 Creates a new instance of GLTranslateScreenPlaneHandle.
static void flush ()
 Flushes any cached data.

Protected Member Functions

virtual std::string getComponentName ()
bool getDraggingPlane (Vec3d &origin, Vec3d &normal)
void drag (const Vec3d &initialPointOnPlane, const Vec3d &previousPointOnPlane, const Vec3d &currentPointOnPlane, const Vec2i &initialMousePosition, const Vec2i &previousMousePosition, const Vec2i &currentMousePosition, bool isFinal)
void startDrag (const Vec3d &initialPointOnPlane, const Vec2i &initialMousePosition)
void endDrag ()
void applyXformToLocation (const std::string &locationPath, const IMATH_NAMESPACE::M44d &xform, bool isFinal)
virtual void calculateAndSetLocalXform (const std::string &locationPath)

Member Function Documentation

void GLTranslateScreenPlaneHandle::applyXformToLocation ( const std::string &  locationPath,
const IMATH_NAMESPACE::M44d &  xform,
bool  isFinal 
) [protected, virtual]

Applies the given rotation transform to the given location. This will also take the rotation order into account.

Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

virtual void GLTranslateScreenPlaneHandle::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 GLTranslateScreenPlaneHandle::drag ( const Vec3d &  initialPointOnPlane,
const Vec3d &  previousPointOnPlane,
const Vec3d &  currentPointOnPlane,
const Vec2i &  initialMousePosition,
const Vec2i &  previousMousePosition,
const Vec2i &  currentMousePosition,
bool  isFinal 
) [protected]

Detects the amount of rotation in either orbital or linear drag, depending on the direction of axis in relation to the camera direction, and applies the rotation to the manipulated locations.

void GLTranslateScreenPlaneHandle::draw ( ) [virtual]

Draws the handle.

Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

void GLTranslateScreenPlaneHandle::endDrag ( ) [protected, virtual]

Callback received when the drag action ends.

Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

virtual std::string GLTranslateScreenPlaneHandle::getComponentName ( ) [inline, protected, virtual]

The transform component: xform.interactive.translate

Implements Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

bool GLTranslateScreenPlaneHandle::getDraggingPlane ( Vec3d &  origin,
Vec3d &  normal 
) [protected]

Gets the dragging plane's origin and normal. The origin is always the same as in the whole manipulator and the the normal is given by the rotation axis (see setup()) in world space.

virtual Foundry::Katana::ViewerUtils::Orientation GLTranslateScreenPlaneHandle::getOrientation ( ) [virtual]

Defines the orientation space of the manipulator.

This uses a "ManipulatorOrientation" option set on the Viewport that specifies the orientation for the manipulator. This option's value is an integer with the correspondent Orientation enum value.

Reimplemented from Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

void GLTranslateScreenPlaneHandle::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 GLTranslateScreenPlaneHandle::startDrag ( const Vec3d &  initialPointOnPlane,
const Vec2i &  initialMousePosition 
) [protected]

Initializes some initial values at drag start.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator