55#ifndef _SO_SEARCH_ACTION_
56#define _SO_SEARCH_ACTION_
135 { derivedIsOk = derivedOk;
return type; }
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
#define SO_ACTION_HEADER(className)
Macros to be called within the class definition header for an action subclass:
Character string stored in a hash table.
Abstract base class for all actions.
bool hasTerminated() const
Returns TRUE if the traversal has reached a termination condition.
void setTerminated(bool flag)
Allows subclass instance to indicate that traversal has reached a termination condition.
Abstract base class for all database nodes.
Maintains a list of pointers to paths.
Path that points to a list of hierarchical nodes.
Searches for nodes in a scene graph.
void setFind(int what)
Sets what to look for; what is a bitmask of LookFor enum values.
virtual ~SoSearchAction()
Destructor.
int getFind()
Returns what to look for.
SoType getType(bool &derivedIsOk) const
Gets the node type to search for.
void setSearchingAll(bool flag)
Sets/returns whether searching uses regular traversal or whether it traverses every single node.
static bool duringSearchAll
This flag is used by the SoSwitch node, which must return a different result from its 'affectsState' ...
SoSearchAction()
Constructor.
void setFound()
Sets/returns whether action has found all desired nodes.
Interest
Enum that defines which paths to return:
@ FIRST
Return only the first path found.
@ LAST
Return only the last path found.
LookFor
Enum that defines the search criterion:
bool isSearchingAll() const
SoPathList & getPaths()
Returns resulting path list. This should be used if the interest is ALL.
void setType(SoType t, bool derivedIsOk=TRUE)
Sets the node type to search for.
SoPath * getPath() const
Returns resulting path, or NULL if no path was found.
const SbName & getName() const
Sets/returns the name of the node to search for.
void setInterest(Interest i)
Sets/returns which paths to return. Default is FIRST.
void reset()
Resets options back to default values; clears list of returned paths.
void setName(const SbName &n)
Sets/returns the name of the node to search for.
void setNode(SoNode *n)
Sets the node to search for.
virtual void beginTraversal(SoNode *node)
Initiates action on graph.
SoNode * getNode() const
Returns the node to search for.
void addPath(SoPath *path)
Sets found path or adds to list of found paths (depending on interest)
Interest getInterest() const
Sets/returns which paths to return. Default is FIRST.
SoType has no virtual functions to keep it small...