Katana Plug-in APIs 0.1
Public Member Functions | Static Public Member Functions

ExampleViewerDelegate Class Reference

#include <ExampleViewerDelegate.h>

Inheritance diagram for ExampleViewerDelegate:
Foundry::Katana::ViewerAPI::ViewerDelegate Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase

List of all members.

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.
SceneNodegetSceneRoot ()
 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.

Detailed Description

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.


Member Function Documentation

void ExampleViewerDelegate::locationEvent ( const Foundry::Katana::ViewerAPI::ViewerLocationEvent event,
bool  locationHandled 
) [override, virtual]

Notification of scene graph location state changes.

Parameters:
eventStruct containing location event information (see "FnViewerLocationEvent.h" for details).
locationHandledTrue 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.

Parameters:
eventStruct containing location event information (see "FnViewerLocationEvent.h" for details).

Implements Foundry::Katana::ViewerAPI::ViewerDelegate.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator