|
Katana Plug-in APIs 0.1
|
The ViewerDelegateComponent class to be extended by plugins. More...
#include <FnViewerDelegateComponent.h>
Public Member Functions | |
| virtual void | setup ()=0 |
| Initializes the ViewportDelegateComponent's resources. | |
| virtual void | cleanup ()=0 |
| Cleans up the ViewportDelegateComponent's resources. | |
| virtual bool | locationEvent (const ViewerLocationEvent &event, bool locationHandled)=0 |
| Notification of scene graph location state changes. | |
| virtual void | locationsSelected (const std::vector< std::string > &locationPaths)=0 |
| Called when the location selection changes in Katana. | |
| virtual bool | isProcessing () const |
| Queries the processing of the Viewer Delegate Component plug-in. | |
| 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. | |
| virtual FnAttribute::DoubleAttribute | getBounds (const std::string &locationPath) |
| Gets the bounds of the given location. | |
| virtual FnAttribute::DoubleAttribute | computeExtent (const std::string &locationPath) |
| Calculates the extent of the given location. | |
Static Public Member Functions | |
| static void | flush () |
| Flush plugin Caches. | |
The ViewerDelegateComponent class to be extended by plugins.
| virtual FnAttribute::DoubleAttribute Foundry::Katana::ViewerAPI::ViewerDelegateComponent::computeExtent | ( | const std::string & | locationPath | ) | [virtual] |
Calculates the extent of the given location.
It calculates the extent of the location based on its geometry.
| locationPath | The location path. |
Reimplemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC.
| static void Foundry::Katana::ViewerAPI::ViewerDelegateComponent::flush | ( | ) | [inline, static] |
Flush plugin Caches.
Allows to discard any cache for this plugin when a Flush Caches event occurs.
Reimplemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC, BallComponent, ExampleSpotlightLocatorVDC, IgnoreComponent, and LoggingComponent.
| virtual FnAttribute::DoubleAttribute Foundry::Katana::ViewerAPI::ViewerDelegateComponent::getBounds | ( | const std::string & | locationPath | ) | [virtual] |
Gets the bounds of the given location.
| locationPath | The location path. |
Reimplemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC.
| virtual FnAttribute::Attribute Foundry::Katana::ViewerAPI::ViewerDelegateComponent::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. |
| FnAttribute::Attribute Foundry::Katana::ViewerAPI::ViewerDelegateComponent::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::ViewerDelegateComponent::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. |
Reimplemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC, and BallComponent.
| virtual bool Foundry::Katana::ViewerAPI::ViewerDelegateComponent::isProcessing | ( | ) | const [inline, virtual] |
Queries the processing of the Viewer Delegate Component plug-in.
| virtual bool Foundry::Katana::ViewerAPI::ViewerDelegateComponent::locationEvent | ( | const ViewerLocationEvent & | event, |
| bool | locationHandled | ||
| ) | [pure virtual] |
Notification of scene graph location state changes.
| event | Struct containing location event information (see "FnViewerLocationEvent.h" for details). |
| locationHandled | True if an already processed (later added) ViewerDelegateComponent has stated that it is handling this location by returning true. In this case, the ViewerDelegateComponent should not draw its own representation. |
Implemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC, BallComponent, ExampleSpotlightLocatorVDC, IgnoreComponent, and LoggingComponent.
| virtual void Foundry::Katana::ViewerAPI::ViewerDelegateComponent::locationsSelected | ( | const std::vector< std::string > & | locationPaths | ) | [pure virtual] |
Called when the location selection changes in Katana.
| locationPaths | The selected location paths. |
Implemented in Foundry::Katana::ViewerUtils::FnBaseLocatorVDC, BallComponent, IgnoreComponent, and LoggingComponent.
| virtual void Foundry::Katana::ViewerAPI::ViewerDelegateComponent::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 ViewerDelegateComponent.
| optionId | The ID of the option created from OptionIdGenerator or manually defined by users. |
| attr | Attribute with the value being set. |
Reimplemented in ExampleSpotlightLocatorVDC.
| void Foundry::Katana::ViewerAPI::ViewerDelegateComponent::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