|
Katana Plug-in APIs 0.1
|
The ManipulatorHandle class to be extended by plugins. More...
#include <FnManipulatorHandle.h>
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. | |
The ManipulatorHandle class to be extended by plugins.
| 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.
| eventData | The event data (see FnEventWrapper). |
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.
| name | The name of the option whose value to retrieve. |
| 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.
| optionId | The ID of the option created from OptionIdGenerator or manually defined by users. |
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.
| inputData | A pointer to some input data that can be used to produce the returned data. |
| 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.
| optionId | The ID of the option created from OptionIdGenerator or manually defined by users. |
| attr | Attribute 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.
| name | The name of the option whose value to set. |
| attr | Attribute with the value to set for the option. |
1.7.3