OpenSceneGraph/doc/doc++/osg/NodeVisitor.html
Robert Osfield ed10594139 Updated docs
2004-08-06 06:53:36 +00:00

601 lines
33 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::NodeVisitor</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.6">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::NodeVisitor</A></H2></H2><BLOCKQUOTE>Visitor for type safe operations on osg::Node's.</BLOCKQUOTE>
<HR>
<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=95>
<param name=classes value="CReferenced,MReferenced.html,CNodeVisitor,MNodeVisitor.html,CCollectOccludersVisitor,MCollectOccludersVisitor.html">
<param name=before value="M,M,M^_">
<param name=after value="Md_,M,M">
<param name=indent value="0,1,1">
<param name=arrowdir value="down">
</APPLET>
<HR>
<DL>
<P><DL>
<DT><H3>Public Classes</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>enum <B><A HREF="#DOC.2.158.1">TraversalMode</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>enum <B><A HREF="#DOC.2.158.2">VisitorType</A></B>
<DT>
class <B><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A></B>: public <!1><A HREF="Referenced.html">osg::Referenced</A>
<DD><I>callback for managing database paging, such as generated by PagedLOD nodes</I>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.158.3">NodeVisitor</A></B>(<!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> tm=<!1><A HREF="NodeVisitor.html#DOC.2.158.1.1">TRAVERSE_NONE</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.158.4">NodeVisitor</A></B>(<!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> type, <!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> tm=<!1><A HREF="NodeVisitor.html#DOC.2.158.1.1">TRAVERSE_NONE</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual <B><A HREF="#DOC.2.158.5">~NodeVisitor</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.6">reset</A></B>()
<DD><I>Method to call to reset visitor.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.7">setVisitorType</A></B>(<!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> type)
<DD><I>Set the VisitorType, used to distingush different visitors during traversal of the scene, typically used in the Node::traverse() method to select which behaviour to use for different types of traversal/visitors</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> <B><A HREF="#DOC.2.158.8">getVisitorType</A></B>() const
<DD><I>Get the VisitorType</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.9">setTraversalNumber</A></B>(int fn)
<DD><I>Set the traversal number.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline int <B><A HREF="#DOC.2.158.10">getTraversalNumber</A></B>() const
<DD><I>Get the traversal number.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.11">setFrameStamp</A></B>(<!1><A HREF="FrameStamp.html">FrameStamp</A>* fs)
<DD><I>Set the FrameStamp that this traversal is assoicated with</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="FrameStamp.html">FrameStamp</A>* <B><A HREF="#DOC.2.158.12">getFrameStamp</A></B>() const
<DD><I>Get the FrameStamp that this traversal is assoicated with</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.13">setTraversalMask</A></B>(Node::NodeMask mask)
<DD><I>Set the TraversalMask of this NodeVisitor.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline Node::NodeMask <B><A HREF="#DOC.2.158.14">getTraversalMask</A></B>() const
<DD><I>Get the TraversalMask</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.15">setNodeMaskOverride</A></B>(Node::NodeMask mask)
<DD><I>Set the NodeMaskOverride mask.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline Node::NodeMask <B><A HREF="#DOC.2.158.16">getNodeMaskOverride</A></B>() const
<DD><I>Get the NodeMaskOverride mask</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.158.17">validNodeMask</A></B>(const <!1><A HREF="Node.html">osg::Node</A>&amp; node) const
<DD><I>Method to called by Node and its subclass' Node::accept() method, if the result is true to be used to cull operations of nodes and their subgraphs.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.18">setTraversalMode</A></B>(<!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> mode)
<DD><I>Set the traversal mode for Node::traverse() to use when deciding which children of a node to traverse.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> <B><A HREF="#DOC.2.158.19">getTraversalMode</A></B>() const
<DD><I>Get the traversal mode</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.20">setUserData</A></B>(<!1><A HREF="Referenced.html">Referenced</A>* obj)
<DD><I> Set user data, data must be subclased from Referenced to allow automatic memory handling.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Referenced.html">Referenced</A>* <B><A HREF="#DOC.2.158.21">getUserData</A></B>()
<DD><I>Get user data</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Referenced.html">Referenced</A>* <B><A HREF="#DOC.2.158.22">getUserData</A></B>() const
<DD><I>Get const user data</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.23">traverse</A></B>(<!1><A HREF="Node.html">Node</A>&amp; node)
<DD><I>Method for handling traversal of a nodes.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.24">pushOntoNodePath</A></B>(<!1><A HREF="Node.html">Node</A>* node)
<DD><I>Method called by osg::Node::accept() method before a call the NodeVisitor::apply().</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.158.25">popFromNodePath</A></B>()
<DD><I>Method callby osg::Node::accept() method after a call the NodeVisitor::apply().</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="NodePath.html">NodePath</A>&amp; <B><A HREF="#DOC.2.158.26">getNodePath</A></B>()
<DD><I>Get the non const NodePath from the top most node applied down to the current Node being visited</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="NodePath.html">NodePath</A>&amp; <B><A HREF="#DOC.2.158.27">getNodePath</A></B>() const
<DD><I>Get the const NodePath from the top most node applied down to the current Node being visited</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual <!1><A HREF="osg.html#DOC.2.262">osg::Vec3</A> <B><A HREF="#DOC.2.158.28">getEyePoint</A></B>() const
<DD><I>Get the eye point in local coordinates.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual float <B><A HREF="#DOC.2.158.29">getDistanceToEyePoint</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; , bool ) const
<DD><I>Get the distance from a point to the eye point, distance value in local coordinate system.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual float <B><A HREF="#DOC.2.158.30">getDistanceFromEyePoint</A></B>(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; , bool ) const
<DD><I>Get the distance of a point from the eye point, distance value in the eye coordinate system.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.31">apply</A></B>(<!1><A HREF="Node.html">Node</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.32">apply</A></B>(<!1><A HREF="Geode.html">Geode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.33">apply</A></B>(<!1><A HREF="Billboard.html">Billboard</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.34">apply</A></B>(<!1><A HREF="Group.html">Group</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.35">apply</A></B>(<!1><A HREF="Projection.html">Projection</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.36">apply</A></B>(<!1><A HREF="CoordinateSystemNode.html">CoordinateSystemNode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.37">apply</A></B>(<!1><A HREF="ClipNode.html">ClipNode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.38">apply</A></B>(<!1><A HREF="TexGenNode.html">TexGenNode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.39">apply</A></B>(<!1><A HREF="LightSource.html">LightSource</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.40">apply</A></B>(<!1><A HREF="Transform.html">Transform</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.41">apply</A></B>(<!1><A HREF="MatrixTransform.html">MatrixTransform</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.42">apply</A></B>(<!1><A HREF="PositionAttitudeTransform.html">PositionAttitudeTransform</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.43">apply</A></B>(<!1><A HREF="Switch.html">Switch</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.44">apply</A></B>(<!1><A HREF="Sequence.html">Sequence</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.45">apply</A></B>(<!1><A HREF="LOD.html">LOD</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.46">apply</A></B>(<!1><A HREF="PagedLOD.html">PagedLOD</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.47">apply</A></B>(<!1><A HREF="Impostor.html">Impostor</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.48">apply</A></B>(<!1><A HREF="ClearNode.html">ClearNode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual void <B><A HREF="#DOC.2.158.49">apply</A></B>(<!1><A HREF="OccluderNode.html">OccluderNode</A>&amp; node)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.158.51">setDatabaseRequestHandler</A></B>(<!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* handler)
<DD><I>Set the handler for database requests</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* <B><A HREF="#DOC.2.158.52">getDatabaseRequestHandler</A></B>()
<DD><I>Get the handler for database requests</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* <B><A HREF="#DOC.2.158.53">getDatabaseRequestHandler</A></B>() const
<DD><I>Get the const handler for database requests</I>
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> <B><A HREF="#DOC.2.158.54">_visitorType</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.2.158.55">_traversalNumber</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="FrameStamp.html">FrameStamp</A>&gt; <B><A HREF="#DOC.2.158.56">_frameStamp</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> <B><A HREF="#DOC.2.158.57">_traversalMode</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>Node::NodeMask <B><A HREF="#DOC.2.158.58">_traversalMask</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>Node::NodeMask <B><A HREF="#DOC.2.158.59">_nodeMaskOverride</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="NodePath.html">NodePath</A> <B><A HREF="#DOC.2.158.60">_nodePath</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="Referenced.html">Referenced</A>&gt; <B><A HREF="#DOC.2.158.61">_userData</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>&gt; <B><A HREF="#DOC.2.158.62">_databaseRequestHandler</A></B>
</DL></P>
</DL>
<HR><H3>Inherited from <A HREF="Referenced.html">Referenced</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>inline <!1><A HREF="Referenced.html">Referenced</A>&amp; <B>operator = </B>(const <!1><A HREF="Referenced.html">Referenced</A>&amp;)
<DT>
<IMG ALT="o" SRC=icon2.gif>static void <B>setDeleteHandler</B>(<!1><A HREF="DeleteHandler.html">DeleteHandler</A>* handler)
<DT>
<IMG ALT="o" SRC=icon2.gif>static <!1><A HREF="DeleteHandler.html">DeleteHandler</A>* <B>getDeleteHandler</B>()
<DT>
<IMG ALT="o" SRC=icon2.gif>inline void <B>ref</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>inline void <B>unref_nodelete</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>inline int <B>referenceCount</B>() const
<DT>
<IMG ALT="o" SRC=icon2.gif>inline void <B>unref</B>() const
</DL></P>
<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>mutable OpenThreads::Mutex <B>_refMutex</B>
<DT>
<IMG ALT="o" SRC=icon2.gif>mutable int <B>_refCount</B>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>Visitor for type safe operations on osg::Node's.
Based on GOF's Visitor pattern. The NodeVisitor
is useful for developing type safe operations to nodes
in the scene graph (as per Visitor pattern), and adds to this
support for optional scene graph traversal to allow
operations to be applied to whole scenes at once. The Visitor
pattern uses a technique of double dispatch as a mechanism to
called the appropriate apply(..) method of the NodeVisitor. To
use this feature one must use the Node::accept(NodeVisitor) which
is extended in each Node subclass, rather than the NodeVisitor
apply directly. So use root->accept(myVisitor); instead of
myVisitor.apply(*root). The later method will bypass the double
dispatch and the appropriate NodeVisitor::apply(..) method will
not be called. </BLOCKQUOTE>
<DL>
<A NAME="TraversalMode"></A>
<A NAME="DOC.2.158.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>enum TraversalMode</B></TT>
<DL><DT><DD></DL><P><DL>
<A NAME="TRAVERSE_NONE"></A>
<A NAME="DOC.2.158.1.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> TRAVERSE_NONE</B></TT>
<DL><DT><DD></DL><P>
<A NAME="TRAVERSE_PARENTS"></A>
<A NAME="DOC.2.158.1.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> TRAVERSE_PARENTS</B></TT>
<DL><DT><DD></DL><P>
<A NAME="TRAVERSE_ALL_CHILDREN"></A>
<A NAME="DOC.2.158.1.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> TRAVERSE_ALL_CHILDREN</B></TT>
<DL><DT><DD></DL><P>
<A NAME="TRAVERSE_ACTIVE_CHILDREN"></A>
<A NAME="DOC.2.158.1.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> TRAVERSE_ACTIVE_CHILDREN</B></TT>
<DL><DT><DD></DL><P></DL>
<A NAME="VisitorType"></A>
<A NAME="DOC.2.158.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>enum VisitorType</B></TT>
<DL><DT><DD></DL><P><DL>
<A NAME="NODE_VISITOR"></A>
<A NAME="DOC.2.158.2.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> NODE_VISITOR</B></TT>
<DL><DT><DD></DL><P>
<A NAME="UPDATE_VISITOR"></A>
<A NAME="DOC.2.158.2.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> UPDATE_VISITOR</B></TT>
<DL><DT><DD></DL><P>
<A NAME="COLLECT_OCCLUDER_VISITOR"></A>
<A NAME="DOC.2.158.2.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> COLLECT_OCCLUDER_VISITOR</B></TT>
<DL><DT><DD></DL><P>
<A NAME="CULL_VISITOR"></A>
<A NAME="DOC.2.158.2.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> CULL_VISITOR</B></TT>
<DL><DT><DD></DL><P></DL>
<A NAME="NodeVisitor"></A>
<A NAME="DOC.2.158.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> NodeVisitor(<!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> tm=<!1><A HREF="NodeVisitor.html#DOC.2.158.1.1">TRAVERSE_NONE</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="NodeVisitor"></A>
<A NAME="DOC.2.158.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> NodeVisitor(<!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> type, <!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> tm=<!1><A HREF="NodeVisitor.html#DOC.2.158.1.1">TRAVERSE_NONE</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="~NodeVisitor"></A>
<A NAME="DOC.2.158.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual ~NodeVisitor()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="reset"></A>
<A NAME="DOC.2.158.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void reset()</B></TT>
<DD>Method to call to reset visitor. Useful for your visitor accumulates
state during a traversal, and you plan to reuse the visitor.
To flush that state for the next traversal than call reset() prior
to each traversal.
<DL><DT><DD></DL><P>
<A NAME="setVisitorType"></A>
<A NAME="DOC.2.158.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setVisitorType(<!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> type)</B></TT>
<DD>Set the VisitorType, used to distingush different visitors during
traversal of the scene, typically used in the Node::traverse() method
to select which behaviour to use for different types of traversal/visitors
<DL><DT><DD></DL><P>
<A NAME="getVisitorType"></A>
<A NAME="DOC.2.158.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> getVisitorType() const </B></TT>
<DD>Get the VisitorType
<DL><DT><DD></DL><P>
<A NAME="setTraversalNumber"></A>
<A NAME="DOC.2.158.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setTraversalNumber(int fn)</B></TT>
<DD>Set the traversal number. Typically used to denote the frame count.
<DL><DT><DD></DL><P>
<A NAME="getTraversalNumber"></A>
<A NAME="DOC.2.158.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline int getTraversalNumber() const </B></TT>
<DD>Get the traversal number. Typically used to denote the frame count.
<DL><DT><DD></DL><P>
<A NAME="setFrameStamp"></A>
<A NAME="DOC.2.158.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setFrameStamp(<!1><A HREF="FrameStamp.html">FrameStamp</A>* fs)</B></TT>
<DD>Set the FrameStamp that this traversal is assoicated with
<DL><DT><DD></DL><P>
<A NAME="getFrameStamp"></A>
<A NAME="DOC.2.158.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="FrameStamp.html">FrameStamp</A>* getFrameStamp() const </B></TT>
<DD>Get the FrameStamp that this traversal is assoicated with
<DL><DT><DD></DL><P>
<A NAME="setTraversalMask"></A>
<A NAME="DOC.2.158.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setTraversalMask(Node::NodeMask mask)</B></TT>
<DD>Set the TraversalMask of this NodeVisitor.
The TraversalMask is used by the NodeVisitor::validNodeMask() method
to determine whether to operate on a node and its subgraph.
validNodeMask() is called automaticaly in the Node::accept() method before
any call to NodeVisitor::apply(), apply() is only ever called if validNodeMask
returns true. Note, if NodeVisitor::_traversalMask is 0 then all operations
will be swithced off for all nodes. Whereas setting both _traversalMask and
_nodeMaskOverride to 0xffffffff will allow a visitor to work on all nodes
regardless of their own Node::_nodeMask state.
<DL><DT><DD></DL><P>
<A NAME="getTraversalMask"></A>
<A NAME="DOC.2.158.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Node::NodeMask getTraversalMask() const </B></TT>
<DD>Get the TraversalMask
<DL><DT><DD></DL><P>
<A NAME="setNodeMaskOverride"></A>
<A NAME="DOC.2.158.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setNodeMaskOverride(Node::NodeMask mask)</B></TT>
<DD>Set the NodeMaskOverride mask.
Used in validNodeMask() to determine whether to operate on a node or its
subgraph, by OR'ing NodeVisitor::_nodeMaskOverride with the Node's own Node::_nodeMask.
Typically used to force on nodes which may have
been switched off by their own Node::_nodeMask.
<DL><DT><DD></DL><P>
<A NAME="getNodeMaskOverride"></A>
<A NAME="DOC.2.158.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Node::NodeMask getNodeMaskOverride() const </B></TT>
<DD>Get the NodeMaskOverride mask
<DL><DT><DD></DL><P>
<A NAME="validNodeMask"></A>
<A NAME="DOC.2.158.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool validNodeMask(const <!1><A HREF="Node.html">osg::Node</A>&amp; node) const </B></TT>
<DD>Method to called by Node and its subclass' Node::accept() method, if the result is true
to be used to cull operations of nodes and their subgraphs.
Return true if the result of a bit wise and of the NodeVisitor::_traversalMask
with the bit or between NodeVistor::_nodeMaskOverride and the Node::_nodeMask.
default values for _traversalMask is 0xffffffff, _nodeMaskOverride is 0x0,
and osg::Node::_nodeMask is 0xffffffff.
<DL><DT><DD></DL><P>
<A NAME="setTraversalMode"></A>
<A NAME="DOC.2.158.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setTraversalMode(<!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> mode)</B></TT>
<DD>Set the traversal mode for Node::traverse() to use when
deciding which children of a node to traverse. If a
NodeVisitor has been attached via setTraverseVisitor()
and the new mode is not TRAVERSE_VISITOR then the attached
visitor is detached. Default mode is TRAVERSE_NONE.
<DL><DT><DD></DL><P>
<A NAME="getTraversalMode"></A>
<A NAME="DOC.2.158.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> getTraversalMode() const </B></TT>
<DD>Get the traversal mode
<DL><DT><DD></DL><P>
<A NAME="setUserData"></A>
<A NAME="DOC.2.158.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void setUserData(<!1><A HREF="Referenced.html">Referenced</A>* obj)</B></TT>
<DD>
Set user data, data must be subclased from Referenced to allow
automatic memory handling. If you own data isn't directly
subclassed from Referenced then create and adapter object
which points to your own objects and handles the memory addressing.
<DL><DT><DD></DL><P>
<A NAME="getUserData"></A>
<A NAME="DOC.2.158.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Referenced.html">Referenced</A>* getUserData()</B></TT>
<DD>Get user data
<DL><DT><DD></DL><P>
<A NAME="getUserData"></A>
<A NAME="DOC.2.158.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Referenced.html">Referenced</A>* getUserData() const </B></TT>
<DD>Get const user data
<DL><DT><DD></DL><P>
<A NAME="traverse"></A>
<A NAME="DOC.2.158.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void traverse(<!1><A HREF="Node.html">Node</A>&amp; node)</B></TT>
<DD>Method for handling traversal of a nodes.
If you intend to use the visitor for actively traversing
the scene graph then make sure the accept() methods call
this method unless they handle traversal directly.
<DL><DT><DD></DL><P>
<A NAME="pushOntoNodePath"></A>
<A NAME="DOC.2.158.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void pushOntoNodePath(<!1><A HREF="Node.html">Node</A>* node)</B></TT>
<DD>Method called by osg::Node::accept() method before
a call the NodeVisitor::apply(). The back of the list will,
therefore, be the current node being visited inside the apply(..),
and the rest of the list will be the parental sequence of nodes
from the top most node applied down the graph to the current node.
Note, the user does not typically call pushNodeOnPath() as it
will be called automatically by the Node::accept() method.
<DL><DT><DD></DL><P>
<A NAME="popFromNodePath"></A>
<A NAME="DOC.2.158.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void popFromNodePath()</B></TT>
<DD>Method callby osg::Node::accept() method after
a call the NodeVisitor::apply().
Note, the user does not typically call pushNodeOnPath() as it
will be called automatically by the Node::accept() method.
<DL><DT><DD></DL><P>
<A NAME="getNodePath"></A>
<A NAME="DOC.2.158.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="NodePath.html">NodePath</A>&amp; getNodePath()</B></TT>
<DD>Get the non const NodePath from the top most node applied down
to the current Node being visited
<DL><DT><DD></DL><P>
<A NAME="getNodePath"></A>
<A NAME="DOC.2.158.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="NodePath.html">NodePath</A>&amp; getNodePath() const </B></TT>
<DD>Get the const NodePath from the top most node applied down
to the current Node being visited
<DL><DT><DD></DL><P>
<A NAME="getEyePoint"></A>
<A NAME="DOC.2.158.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual <!1><A HREF="osg.html#DOC.2.262">osg::Vec3</A> getEyePoint() const </B></TT>
<DD>Get the eye point in local coordinates.
Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
<DL><DT><DD></DL><P>
<A NAME="getDistanceToEyePoint"></A>
<A NAME="DOC.2.158.29"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual float getDistanceToEyePoint(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; , bool ) const </B></TT>
<DD>Get the distance from a point to the eye point, distance value in local coordinate system.
Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.
<DL><DT><DD></DL><P>
<A NAME="getDistanceFromEyePoint"></A>
<A NAME="DOC.2.158.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual float getDistanceFromEyePoint(const <!1><A HREF="osg.html#DOC.2.262">Vec3</A>&amp; , bool ) const </B></TT>
<DD>Get the distance of a point from the eye point, distance value in the eye coordinate system.
Note, not all NodeVisitor implement this method, it is mainly cull visitors which will implement.
If the getDistianceFromEyePoint(pos) is not implmented than a default value of 0.0 is returned.
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Node.html">Node</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.32"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Geode.html">Geode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.33"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Billboard.html">Billboard</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.34"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Group.html">Group</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.35"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Projection.html">Projection</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.36"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="CoordinateSystemNode.html">CoordinateSystemNode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.37"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="ClipNode.html">ClipNode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.38"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="TexGenNode.html">TexGenNode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.39"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="LightSource.html">LightSource</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.40"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Transform.html">Transform</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.41"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="MatrixTransform.html">MatrixTransform</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.42"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="PositionAttitudeTransform.html">PositionAttitudeTransform</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.43"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Switch.html">Switch</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.44"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Sequence.html">Sequence</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.45"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="LOD.html">LOD</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.46"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="PagedLOD.html">PagedLOD</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.47"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="Impostor.html">Impostor</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.48"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="ClearNode.html">ClearNode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="apply"></A>
<A NAME="DOC.2.158.49"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual void apply(<!1><A HREF="OccluderNode.html">OccluderNode</A>&amp; node)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setDatabaseRequestHandler"></A>
<A NAME="DOC.2.158.51"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setDatabaseRequestHandler(<!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* handler)</B></TT>
<DD>Set the handler for database requests
<DL><DT><DD></DL><P>
<A NAME="getDatabaseRequestHandler"></A>
<A NAME="DOC.2.158.52"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* getDatabaseRequestHandler()</B></TT>
<DD>Get the handler for database requests
<DL><DT><DD></DL><P>
<A NAME="getDatabaseRequestHandler"></A>
<A NAME="DOC.2.158.53"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>* getDatabaseRequestHandler() const </B></TT>
<DD>Get the const handler for database requests
<DL><DT><DD></DL><P>
<A NAME="_visitorType"></A>
<A NAME="DOC.2.158.54"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="NodeVisitor.html#DOC.2.158.2">VisitorType</A> _visitorType</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_traversalNumber"></A>
<A NAME="DOC.2.158.55"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int _traversalNumber</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_frameStamp"></A>
<A NAME="DOC.2.158.56"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="FrameStamp.html">FrameStamp</A>&gt; _frameStamp</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_traversalMode"></A>
<A NAME="DOC.2.158.57"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="NodeVisitor.html#DOC.2.158.1">TraversalMode</A> _traversalMode</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_traversalMask"></A>
<A NAME="DOC.2.158.58"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>Node::NodeMask _traversalMask</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_nodeMaskOverride"></A>
<A NAME="DOC.2.158.59"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>Node::NodeMask _nodeMaskOverride</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_nodePath"></A>
<A NAME="DOC.2.158.60"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="NodePath.html">NodePath</A> _nodePath</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_userData"></A>
<A NAME="DOC.2.158.61"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="Referenced.html">Referenced</A>&gt; _userData</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_databaseRequestHandler"></A>
<A NAME="DOC.2.158.62"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="DatabaseRequestHandler.html">DatabaseRequestHandler</A>&gt; _databaseRequestHandler</B></TT>
<DL><DT><DD></DL><P></DL>
<HR>
<DL><DT><B>Direct child classes:
</B><DD><A HREF="CollectOccludersVisitor.html">CollectOccludersVisitor</A><BR>
</DL>
<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://www.linuxsupportline.com/~doc++">DOC++</A>.
</BODY>
</HTML>