|
Katana Plug-in APIs 0.1
|
#include <ExampleViewerDelegate.h>
Public Member Functions | |
| void | setup () |
| Initializes the ViewerDelegate. | |
| void | cleanup () |
| Cleans up the resources. | |
| void | setOption (OptionIdGenerator::value_type optionId, FnAttribute::Attribute attr) |
| Stores the passed option in a map. | |
| FnAttribute::Attribute | getOption (OptionIdGenerator::value_type optionId) |
| Returns the specified option from a map, or an invalid attribute. | |
| void | locationEvent (const Foundry::Katana::ViewerAPI::ViewerLocationEvent &event, bool locationHandled) override |
| Notification of scene graph location state changes. | |
| void | sourceLocationEvent (const Foundry::Katana::ViewerAPI::ViewerLocationEvent &event) override |
| Notification of 'sources' scene graph location state changes. | |
| void | locationsSelected (const std::vector< std::string > &locations) |
| Called when locations are selected in Katana. | |
| void | freeze () |
| Freeze the layer state when not visible. | |
| void | thaw () |
| Thaw the layer state when made visible. | |
| SceneNode * | getSceneRoot () |
| Returns the root SceneNode. | |
Static Public Member Functions | |
|
static Foundry::Katana::ViewerAPI::ViewerDelegate * | create () |
| Returns a new instance of ExampleViewerDelegate. | |
| static void | flush () |
| Flushes any cached data. | |
This class adds all of our required custom behaviour to the ViewerDelegate interface. Currently it's main responsibility is maintaining the tree of SceneNode objects, which represent locations in the scene graph, which can be drawn by viewports.
It is important to not that since no OpenGL context is made current prior to ViewerDelegate functions being called, it should not be the delegates job to update graphics resources on the SceneNodes. Instead they should be flagged as dirty, and will be setup by the viewports in a deferred manner.
| void ExampleViewerDelegate::locationEvent | ( | const Foundry::Katana::ViewerAPI::ViewerLocationEvent & | event, |
| bool | locationHandled | ||
| ) | [override, virtual] |
Notification of scene graph location state changes.
| event | Struct containing location event information (see "FnViewerLocationEvent.h" for details). |
| locationHandled | True if a ViewerDelegateComponent has, on processing this event, stated that it is handling this location. In this case, the Viewer Delegate should not draw its own representation. |
Implements Foundry::Katana::ViewerAPI::ViewerDelegate.
| void ExampleViewerDelegate::sourceLocationEvent | ( | const Foundry::Katana::ViewerAPI::ViewerLocationEvent & | event | ) | [override, virtual] |
Notification of 'sources' scene graph location state changes.
| event | Struct containing location event information (see "FnViewerLocationEvent.h" for details). |
Implements Foundry::Katana::ViewerAPI::ViewerDelegate.
1.7.3