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

Foundry::Katana::ViewerUtils::FnBaseLocator Class Reference

#include <FnBaseLocator.h>

Inheritance diagram for Foundry::Katana::ViewerUtils::FnBaseLocator:
ExampleSpotlightLocator

List of all members.

Public Types

typedef std::shared_ptr
< FnBaseLocator
Ptr
 Shared pointer type.
typedef std::weak_ptr
< FnBaseLocator
WeakPtr
 Weak pointer type.

Public Member Functions

virtual void setup ()=0
virtual void cleanup ()=0
virtual void locationSetup (const std::string &locationPath, bool isPicking)
 Called immediately before a location is drawn.
virtual void locationCleanup (const std::string &locationPath, bool isPicking)
 Called immediately after a location is drawn.
virtual void draw (const std::string &locationPath)=0
virtual void pickerDraw (const std::string &locationPath)=0
virtual void onFrameBegin (bool isPicking)
 Called at the beginning of each frame to allow batching of draws.
virtual void onFrameEnd (bool isPicking)
 Called at the end of each frame to allow batching of draws.
FnBaseLocatorVDCgetViewerDelegateComponent () const
 Returns the ViewerDelegateComponent for querying scene data.
void setViewerDelegateComponent (FnBaseLocatorVDC *vdc)
 Sets the ViewerDelegateComponent for querying scene data.
FnBaseLocatorViewportLayergetViewportLayer () const
 Returns the ViewportLayer that owns this object.
void setViewportLayer (FnBaseLocatorViewportLayer *vdc)
 Sets the ViewportLayer that owns this object.
FnAttribute::Attribute getAttribute (const std::string &locationPath, const std::string &attrName="")
bool isLocationSelected (const std::string &locationPath)
GLShaderProgramgetDefaultShaderProgram () const
 Returns the default shading shader program.
void setDefaultShaderProgram (GLShaderProgram *shaderProgram)
 Sets the default shading shader program.

Detailed Description

Base class implementing a locator plug-in that is used to customize how an object that's represented by a scene graph location is drawn. Each locator plug-in will be instantiated once per viewport, and is used to draw the geometry for multiple matching locations.


Member Function Documentation

virtual void Foundry::Katana::ViewerUtils::FnBaseLocator::cleanup ( ) [pure virtual]

Allows the object to clean up resources (called with a valid OpenGL context).

Implemented in ExampleSpotlightLocator.

virtual void Foundry::Katana::ViewerUtils::FnBaseLocator::draw ( const std::string &  locationPath) [pure virtual]

Draws the object that's represented by the scene graph location with the given path using the given shader program.

Implemented in ExampleSpotlightLocator.

FnAttribute::Attribute Foundry::Katana::ViewerUtils::FnBaseLocator::getAttribute ( const std::string &  locationPath,
const std::string &  attrName = "" 
)

Returns the named attribute of the scene graph location with the given path, or all attributes if an attribute name is not specified.

bool Foundry::Katana::ViewerUtils::FnBaseLocator::isLocationSelected ( const std::string &  locationPath)

Returns true if the scene graph location with the given path is currently selected.

virtual void Foundry::Katana::ViewerUtils::FnBaseLocator::pickerDraw ( const std::string &  locationPath) [pure virtual]

Draws the object that's represented by the scene graph location with the given path using the given shader program as part of a picking pass.

Implemented in ExampleSpotlightLocator.

virtual void Foundry::Katana::ViewerUtils::FnBaseLocator::setup ( ) [pure virtual]

Called after the object has been created to initialize resources (called with a valid OpenGL context).

Implemented in ExampleSpotlightLocator.


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