GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOSEARCHACTION (3)

NAME

SoSearchAction — searches for nodes in a scene graph

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoAction > SoSearchAction

SYNOPSIS

#include <Inventor/actions/SoSearchAction.h>

enum LookFor {     SoSearchAction::NODE    
                       SoSearchAction::NODE   Search for a particular node (by pointer)    
SoSearchAction::TYPE    
                       SoSearchAction::TYPE   Search for a particular type of node    
SoSearchAction::NAME    
                       SoSearchAction::NAME   Search for a node with a particular name
}

enum Interest {     SoSearchAction::FIRST    
                        SoSearchAction::FIRST   Return only the first path found    
SoSearchAction::LAST    
                        SoSearchAction::LAST    Return only the last path found    
SoSearchAction::ALL    
                        SoSearchAction::ALL     Return all paths found
}

Methods from class SoSearchAction:

       
                    
                     SoSearchAction()    
void    
                    
void                 setNode(SoNode *n)    
SoNode *    
                    
SoNode *             getNode() const    
void    
                    
void                 setType(SoType t, SbBool derivedIsOk = TRUE)    
SoType    
                    
SoType               getType(SbBool &derivedIsOk) const    
void    
                    
void                 setName(const SbName &n)    
const SbName &    
                    
const SbName &       getName() const    
void    
                    
void                 setFind(int what)    
int    
                    
int                  getFind()    
void    
                    
void                 setInterest(Interest interest)    
Interest    
                    
Interest             getInterest() const    
void    
                    
void                 setSearchingAll(SbBool flag)    
SbBool    
                    
SbBool               isSearchingAll() const    
SoPath *    
                    
SoPath *             getPath() const    
SoPathList &    
                    
SoPathList &         getPaths()    
void    
                    
void                 reset()

Methods from class SoAction:

    virtual void    
                    
virtual void         apply(SoNode *node)    
virtual void    
                    
virtual void         apply(SoPath *path)    
virtual void    
                    
virtual void         apply(const SoPathList &pathList, SbBool obeysRules = FALSE)    
static SoType    
                    
static SoType        getClassTypeId()    
virtual SoType    
                    
virtual SoType       getTypeId()    
virtual SbBool    
                    
virtual SbBool       isOfType(SoType type)    
virtual void    
                    
virtual void         invalidateState()

DESCRIPTION

This class is used to search scene graphs for specific nodes, nodes of a specific type, nodes with a specific name, or any combination of these. It can search for just the first or last node satisfying the criteria or for all such nodes. The actions return paths to each node found.

Note that by default nodekits do not search their children when a search action is applied. The man page for SoBaseKit discusses the methods SoBaseKit::isSearchingChildren() and SoBaseKit::setSearchingChildren(), which allow you to query and control this behavior.

METHODS

       
                    
                     SoSearchAction()
Constructor.

    void    
                    
void                 setNode(SoNode *n)    
SoNode *    
                    
SoNode *             getNode() const
Sets/returns the node to search for.

    void    
                    
void                 setType(SoType t, SbBool derivedIsOk = TRUE)    
SoType    
                    
SoType               getType(SbBool &derivedIsOk) const
Sets/returns the node type to search for. If derivedIsOk is TRUE, a node that is of a type that is derived from t will pass this search criterion.

    void    
                    
void                 setName(const SbName &n)    
const SbName &    
                    
const SbName &       getName() const
Sets/returns the name of the node to search for.

    void    
                    
void                 setFind(int what)    
int    
                    
int                  getFind()
Sets/returns what to look for; what is a bitmask of LookFor enum values. Default is no flags at all. Note that setting a node, type, and/or name to search for activates the relevant flag, so you may never need to call this method directly.

    void    
                    
void                 setInterest(Interest interest)    
Interest    
                    
Interest             getInterest() const
Sets/returns which paths to return. Default is FIRST.

    void    
                    
void                 setSearchingAll(SbBool flag)    
SbBool    
                    
SbBool               isSearchingAll() const
Sets/returns whether searching uses regular traversal or whether it traverses every single node. For example, if this flag is FALSE, an SoSwitch node will traverse only the child or children it would normally traverse for an action. If the flag is TRUE, the switch would always traverse all of its children. The default is FALSE.

    SoPath *    
                    
SoPath *             getPath() const
Returns resulting path, or NULL if no path was found. This should be used if the interest is FIRST or LAST.

    SoPathList &    
                    
SoPathList &         getPaths()
Returns resulting path list. This should be used if the interest is ALL.

    void    
                    
void                 reset()
Resets options back to default values; clears list of returned paths. This can be used to apply the action again with a different set of search criteria.

SEE ALSO

SoPath, SoBaseKit

Search for    or go to Top of page |  Section 3 |  Main Index


SOSEARCHACTION(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.