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

GLScaleUniformHandle Class Reference

A handle to scale the selected object uniformly in 3 dimensions. More...

#include <FnGLScaleUniformHandle.h>

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

List of all members.

Public Member Functions

 GLScaleUniformHandle ()
 Constructor.
virtual ~GLScaleUniformHandle ()
 Destructor.
void draw ()
void pickerDraw (int64_t pickerId)
void setup ()
 Initializes the 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 GLScaleUniformHandle.
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 applyXformToLocation (const std::string &locationPath, const IMATH_NAMESPACE::M44d &xform, bool isFinal)

Detailed Description

A handle to scale the selected object uniformly in 3 dimensions.

This class represents a central scaling handle that can be used to scale an object uniformly in all 3 dimensions. The user can drag horizontally, increasing the uniform scaling by dragging to the right, and decreasing by dragging to the left of the origin.

The mesh used for the manipulator is a central cube.


Member Function Documentation

void GLScaleUniformHandle::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 GLScaleUniformHandle::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 GLScaleUniformHandle::draw ( ) [virtual]

Draws the handle.

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

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

The transform component: xform.interactive.scale

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

bool GLScaleUniformHandle::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 the normal is given by the camera direction (inverted).

Reimplemented from Foundry::Katana::ViewerUtils::GLManipulatorHandle.

void GLScaleUniformHandle::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.


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