Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::ViewerAPI::ManipulatorHandle Class Reference

The ManipulatorHandle class to be extended by plugins. More...

#include <FnManipulatorHandle.h>

Inheritance diagram for Foundry::Katana::ViewerAPI::ManipulatorHandle:
Foundry::Katana::ViewerAPI::ManipulatorHandlePluginBase Foundry::Katana::ViewerUtils::GLManipulatorHandle Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle GLCoiHandle GLRotateAxisHandle GLRotateBallHandle GLScaleAxisHandle GLScalePlaneHandle GLScaleUniformHandle GLTranslateAxisHandle GLTranslatePlaneHandle GLTranslateScreenPlaneHandle

List of all members.

Public Member Functions

virtual void cancelManipulation ()=0
 Cancels the manipulation.
virtual void draw ()=0
 Draws the Manipulator Handle.
virtual void pickerDraw (int64_t pickerId)=0
 Draws the ManipulatorHandle for picking.
virtual bool event (const FnEventWrapper &eventData)
 Processes UI events.
virtual void * getPrivateData (void *inputData)
 Returns some arbitrary data.
virtual void setOption (OptionIdGenerator::value_type optionId, FnAttribute::Attribute attr)
 Sets a generic option.
virtual FnAttribute::Attribute getOption (OptionIdGenerator::value_type optionId)
 Gets the value of a generic option.
void setOption (const std::string &name, FnAttribute::Attribute attr)
 Sets a generic option by generating an option ID from the passed name.
FnAttribute::Attribute getOption (const std::string &name)
 Gets a generic option by generating an option ID from the passed name.

Detailed Description

The ManipulatorHandle class to be extended by plugins.


Member Function Documentation

virtual void Foundry::Katana::ViewerAPI::ManipulatorHandle::cancelManipulation ( ) [pure virtual]

Cancels the manipulation.

Typically called before the handle is destroyed to discard any pending transform that hasn't been made persistent while dragging the handle.

Implemented in Foundry::Katana::ViewerUtils::GLManipulatorHandle, and Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle.

virtual void Foundry::Katana::ViewerAPI::ManipulatorHandle::draw ( ) [pure virtual]

Draws the Manipulator Handle.

Called when the scene needs to be drawn in the correct GL context. In a non-GL renderer the generated image should be drawn in the GL framebuffer in order to be displayed.

Implemented in Foundry::Katana::ViewerUtils::GLManipulatorHandle, GLCoiHandle, Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle, GLRotateAxisHandle, GLRotateBallHandle, GLScaleAxisHandle, GLScalePlaneHandle, GLScaleUniformHandle, GLTranslateAxisHandle, GLTranslatePlaneHandle, and GLTranslateScreenPlaneHandle.

virtual bool Foundry::Katana::ViewerAPI::ManipulatorHandle::event ( const FnEventWrapper eventData) [virtual]

Processes UI events.

Called whenever a user interaction event occurs.

Parameters:
eventDataThe event data (see FnEventWrapper).
Returns:
True if the event has been handled, in that case it should not be passed to the following handles. Otherwise false and the event should be passed to the following handles.

Reimplemented in Foundry::Katana::ViewerUtils::GLManipulatorHandle.

FnAttribute::Attribute Foundry::Katana::ViewerAPI::ManipulatorHandle::getOption ( const std::string &  name)

Gets a generic option by generating an option ID from the passed name.

This generates an Option ID from the passed string and passes it to getOption(OptionIdGenerator::value_type optionId). Since the ID is generated on every call, it is more efficient to generate the ID once, and store it for future use.

Parameters:
nameThe name of the option whose value to retrieve.
Returns:
The value of the option with the given name.
virtual FnAttribute::Attribute Foundry::Katana::ViewerAPI::ManipulatorHandle::getOption ( OptionIdGenerator::value_type  optionId) [virtual]

Gets the value of a generic option.

Optional. Returns the value of a generic option being requested from Python or from other C++ Viewer plugin classes.

Parameters:
optionIdThe ID of the option created from OptionIdGenerator or manually defined by users.
Returns:
Attribute with the value of the option.

Reimplemented in Foundry::Katana::ViewerUtils::GLManipulatorHandle, GLRotateAxisHandle, and GLRotateBallHandle.

virtual void* Foundry::Katana::ViewerAPI::ManipulatorHandle::getPrivateData ( void *  inputData) [inline, virtual]

Returns some arbitrary data.

This can be used by other plugins to access some data that is specific to this object after it is compiled, allowing built-in parts of existing Viewers to be extendable by other plugins like ViewerDelegateComponents, Viewports and ViewportLayers.

This function should be called by other plugins after getting a ManipulatorWrapperPtr and converting it into a concrete instance via ManipulatorWrapper::getPluginInstance(). These other plugins will have to be built with the same compiler and using the same compiler flags as the ViewerDelegate so that this data can be cast and used without running into C++ name mangling issues.

Parameters:
inputDataA pointer to some input data that can be used to produce the returned data.
Returns:
The arbitrary private data. A void pointer that can be cast into specific object types by other plugins.
virtual void Foundry::Katana::ViewerAPI::ManipulatorHandle::pickerDraw ( int64_t  pickerId) [pure virtual]

Draws the ManipulatorHandle for picking.

Called when the scene needs to be drawn in order to perform objects selection. This will run in the correct GL context. In a non-GL renderer the generated image should be drawn in the GL framebuffer in order to be displayed.

Implemented in Foundry::Katana::ViewerUtils::GLManipulatorHandle, Foundry::Katana::ViewerUtils::GLTransformManipulatorHandle, GLRotateAxisHandle, GLRotateBallHandle, GLScaleAxisHandle, GLScalePlaneHandle, GLScaleUniformHandle, GLTranslateAxisHandle, GLTranslatePlaneHandle, and GLTranslateScreenPlaneHandle.

virtual void Foundry::Katana::ViewerAPI::ManipulatorHandle::setOption ( OptionIdGenerator::value_type  optionId,
FnAttribute::Attribute  attr 
) [inline, virtual]

Sets a generic option.

Optional. Reacts to a generic option being set from Python or called directly by other C++ Viewer plugin classes. This can be used as a message passing mechanism from the outside into the ManipulatorHandle.

Parameters:
optionIdThe ID of the option created from OptionIdGenerator or manually defined by users.
attrAttribute with the value being set.
void Foundry::Katana::ViewerAPI::ManipulatorHandle::setOption ( const std::string &  name,
FnAttribute::Attribute  attr 
)

Sets a generic option by generating an option ID from the passed name.

This generates an Option ID from the passed string and passes it to setOption(OptionIdGenerator::value_type optionId, FnAttribute::Attribute attr). Since the ID is generated on every call, it is more efficient to generate the ID once, and store it for future use.

Parameters:
nameThe name of the option whose value to set.
attrAttribute with the value to set for the option.

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