Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::FnScenegraphIterator Class Reference

The Scenegraph Iterator that 'points' at a location in a scenegraph. More...

#include <FnScenegraphIterator.h>

List of all members.

Public Member Functions

bool isValid () const
 Returns true if this Scenegraph Iterator is valid.
std::string getName () const
 Returns the name of the current Location. (ex: "pony" in "/root/world/geo/pony")
std::string getFullName () const
 Returns the full path name of the current Location. (ex: "/root/world/geo/pony")
std::string getType () const
 Returns the type of the current Location. (ex: "subdmesh" or "group")
FnScenegraphIterator getFirstChild (bool evict=false) const
 Returns an iterator that poins at the first child of the current location.
FnScenegraphIterator getNextSibling (bool evict=false) const
 Returns an iterator that poins at the next sibling of the current location.
FnScenegraphIterator getParent () const
 Returns an iterator that poins at the parent of the current location.
FnScenegraphIterator getRoot () const
 Returns an iterator that poins at the root location of the scenegraph where the current locations lives.
FnAttribute::StringAttribute getPotentialChildren () const
FnScenegraphIterator getChildByName (const std::string &name, bool evict=false) const
 Returns an iterator to a child of the current location.
FnScenegraphIterator getByPath (const std::string &path, bool evict=false) const
 Returns an iterator pointing at a location with a given path.
FnAttribute::Attribute getAttribute (const std::string &name, bool global=false) const
 Get a specific attribute from the location pointed by the iterator.
FnAttribute::StringAttribute getAttributeNames () const
 Return the names of all the attributes on the location pointed by the iterator.
FnAttribute::GroupAttribute getGlobalXFormGroup () const
void finalizeRuntime () const

Detailed Description

The Scenegraph Iterator that 'points' at a location in a scenegraph.

Each instance of this class will be conceptually pointing at a specific location of the scenegraph. It presents methods that return other iterators that point at child, sibling, parent and other arbitraty locations on the scenegraph. The location pointed by the instance is referred here as "current location".


Member Function Documentation

void Foundry::Katana::FnScenegraphIterator::finalizeRuntime ( ) const

Notifies the Geolib Runtime that the renderer plug-in will not interact with it again, and therefore resources can be deallocated (e.g. cached scene data, internal threads, etc.).

To be used (just) after the scene has been entirely traversed, and typically before the renderer starts rendering.

This function can take time. It may be desirable to invoke this function from a worker thread to avoid blocking the actual rendering.

Note:
All iterators associated with the same runtime instance will be invalidated, as no more interaction is expected from them.
FnAttribute::Attribute Foundry::Katana::FnScenegraphIterator::getAttribute ( const std::string &  name,
bool  global = false 
) const

Get a specific attribute from the location pointed by the iterator.

Returns an existing Attribute from the current Location if no location is specified. If there isn't any Attribute with the given name on the given Location then an invalid FnAttribute is returned (which can be checked with the function FnAttribute::isValid()).

Parameters:
nameThe name of the attribute - can be a child of a GroupAttribute (ex: "geometry.point.P")
globalIf false then the global attributes (inherited from parent Locations) will be ignored. In this case if the requested Attribute is global, then an invalid attribute is returned.
FnAttribute::StringAttribute Foundry::Katana::FnScenegraphIterator::getAttributeNames ( ) const

Return the names of all the attributes on the location pointed by the iterator.

Returns:
A valid StringAttribute
FnScenegraphIterator Foundry::Katana::FnScenegraphIterator::getByPath ( const std::string &  path,
bool  evict = false 
) const

Returns an iterator pointing at a location with a given path.

Returns an iterator that points to a location in the scene graph that is identified by the given forward slash-separated scene graph location path.

Parameters:
pathThe forward slash-separated path of the scene graph location for which to return a scene graph iterator.
evictFlag that controls whether the Geolib3 Runtime will flush cached scene data, while protecting data that is deemed potentially relevant to the scene graph location with the given path, for example that of ancestor locations.
FnScenegraphIterator Foundry::Katana::FnScenegraphIterator::getChildByName ( const std::string &  name,
bool  evict = false 
) const

Returns an iterator to a child of the current location.

Returns an iterator that points at a child location with the given name underneath the current location.

Parameters:
nameThe name of the child location for which to return a scene graph iterator.
evictFlag that controls whether the Geolib3 Runtime will flush cached scene data, while protecting data that is deemed potentially relevant to the child scene graph location with the given name, for example that of ancestor locations.
FnAttribute::GroupAttribute Foundry::Katana::FnScenegraphIterator::getGlobalXFormGroup ( ) const
Returns:
a GroupAttribute that represents the global transform for this location.
FnAttribute::StringAttribute Foundry::Katana::FnScenegraphIterator::getPotentialChildren ( ) const
Returns:
a list of immediate potential child names

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