|
Katana Plug-in APIs 0.1
|
Extends the functionality of an existing ViewerDelegate. More...
#include <FnViewerDelegateComponent.h>
Public Member Functions | |
| ViewerDelegateComponentPluginBase () | |
| Constructor. | |
| virtual | ~ViewerDelegateComponentPluginBase () |
| Destructor. | |
| ViewerDelegateWrapperPtr | getViewerDelegate () |
| Returns the viewer delegate that this component is associated with. | |
| FnAttribute::GroupAttribute | getAttributes (const std::string &locationPath) |
| Gets cooked attributes for a location. | |
Extends the functionality of an existing ViewerDelegate.
A ViewerDelegateComponent allows to extend the support for more location types or attribute conventions that are not supported by the ViewerDelegate. Together with the ViewportLayer plugin type, an already compiled Viewer can be extended. This can also be used to modularize the features of a ViewerDelegate. For example each location type can have its own ViewerDelegateComponent, which can be added/removed to the Viewer at runtime.
Whenever a ViewerDelegateComponent has to access some private data that is kept in the ViewerDelegate the method ViewerDelegate::getPrivateData() can be used to access that data. In this case the compiler used to build the ViewerDelegate and the ViewerDelegateComponent have to be the same.
A ViewerDelegateComponent 'locationEvent' callback function can return true in order to inform other ViewerDelegateComponents and the ViewerDelegate that it is handling the location. This may allow existing functionality in the ViewerDelegate to be removed/ignored. For example, if the ViewerDelegate has 2 ViewerDelegateComponent (A and B) and a new one (C) is added, then if C::locationEvent() returns true, then the locationEvent() callback of A, B, and the ViewerDelegate will be called with locationHandled=true.
ViewerDelegateComponent is the class that plugins should extend and implement.
ViewerDelegateComponentWrapper is the class that allows other plugin types to access the ViewerDelegateComponent plugin.
ViewerDelegateComponentPluginBase is the base class that provides the common methods between ViewerDelegateComponent and ViewerDelegateComponentWrapper.
| FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::ViewerDelegateComponentPluginBase::getAttributes | ( | const std::string & | locationPath | ) |
Gets cooked attributes for a location.
Gets the cached cooked attributes for the location. Returns an invalid group attribute if the location hasn't been cooked.
During the manipulation of an attribute by a Manipulator, the last value set by it will be returned instead of the cached cooked attribute. This allows faster interactive representation of the scene graph during the manipulation, since the cooking might not be fast enough to provide an interactive speed.
| locationPath | The location path. |
| ViewerDelegateWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegateComponentPluginBase::getViewerDelegate | ( | ) |
Returns the viewer delegate that this component is associated with.
1.7.3