|
Katana Plug-in APIs 0.1
|
Manipulator plug-in base class. More...
#include <FnManipulator.h>
Public Member Functions | |
| Manipulator () | |
| Constructor. | |
| virtual | ~Manipulator () |
| Destructor. | |
| virtual void | setup ()=0 |
| Initializes the GL components of the Viewport. | |
| virtual bool | event (const FnEventWrapper &eventData) |
| Processes UI events. | |
| virtual void | draw () |
| Draws the Manipulator. | |
| virtual void | pickerDraw (int64_t pickerId) |
| Draws the Manipulator for picking. | |
| 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. | |
Static Public Member Functions | |
| static bool | matches (const FnAttribute::GroupAttribute &locationAttrs) |
| Specifies if the Manipulator can be applied to a location. | |
| static FnAttribute::GroupAttribute | getTags () |
| Gets the Manipulator tags. | |
Manipulator plug-in base class.
| virtual void Foundry::Katana::ViewerAPI::Manipulator::draw | ( | ) | [virtual] |
Draws the Manipulator.
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.
Reimplemented in GLCoiManipulator.
| virtual bool Foundry::Katana::ViewerAPI::Manipulator::event | ( | const FnEventWrapper & | eventData | ) | [virtual] |
Processes UI events.
Called whenever a user interaction event occurs.
| eventData | The event data (see FnEventWrapper). |
| virtual FnAttribute::Attribute Foundry::Katana::ViewerAPI::Manipulator::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::GLTransformManipulator.
| FnAttribute::Attribute Foundry::Katana::ViewerAPI::Manipulator::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 void* Foundry::Katana::ViewerAPI::Manipulator::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. |
| static FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::Manipulator::getTags | ( | ) | [static] |
Gets the Manipulator tags.
Returns the tags for this Manipulator. These tags are key:value pairs containing meta-data that can be used by the Viewers to categorize and identify the available Manipulators. For example, a possible tag could be {type:transform}, meaning that the Manipulator allows to manipulate object transforms (manipulators like rotate, translate, scale could be tagged like this). The Viewer tab can use these tags to, for example, group the Manipulators according to their functionality on a UI menu, or it can discard Manipulators that are not meant to be available on on that Viewer.
Reimplemented in GLCoiManipulator, GLRotateManipulator, GLScaleManipulator, and GLTranslateManipulator.
| static bool Foundry::Katana::ViewerAPI::Manipulator::matches | ( | const FnAttribute::GroupAttribute & | locationAttrs | ) | [static] |
Specifies if the Manipulator can be applied to a location.
Specifies if the passed locations attributes has the attributes that are required by this Manipulator. This should be extended in sub-classes.
| virtual void Foundry::Katana::ViewerAPI::Manipulator::pickerDraw | ( | int64_t | pickerId | ) | [virtual] |
Draws the Manipulator 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.
Reimplemented in GLCoiManipulator.
| virtual void Foundry::Katana::ViewerAPI::Manipulator::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 Manipulator.
| optionId | The ID of the option created from OptionIdGenerator or manually defined by users. |
| attr | Attribute with the value being set. |
Reimplemented in Foundry::Katana::ViewerUtils::GLTransformManipulator.
| void Foundry::Katana::ViewerAPI::Manipulator::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. |
| virtual void Foundry::Katana::ViewerAPI::Manipulator::setup | ( | ) | [pure virtual] |
Initializes the GL components of the Viewport.
Called when a Manipulator is created. It runs inside the correct GL context. This can be used to initialize anything GL related.
Implemented in GLCoiManipulator, GLRotateManipulator, GLScaleManipulator, and GLTranslateManipulator.
1.7.3