V-ART
snlocator.h
Go to the documentation of this file.
1 
5 // This abstract class defines an interface. There is no implementation.
6 
7 #ifndef VART_SNLOCATOR_H
8 #define VART_SNLOCATOR_H
9 
10 #include "vart/snoperator.h"
11 #include "vart/sgpath.h"
12 
13 namespace VART {
14  class SceneNode;
25  class SNLocator : public SNOperator
26  {
27  public:
28  // PUBLIC STATIC METHODS
29  // PUBLIC METHODS
30  SNLocator();
31  virtual ~SNLocator() {}
32 
34  virtual void OperateOn(const SceneNode* nodePtr) = 0;
35 
40  bool NotFinished() const { return notFinished; }
41 
46  bool Finished() const { return !notFinished; }
47 
55  const SGPath& Path() const { return path; }
56 
63 
67  virtual void Reset();
68 
72  const SceneNode* LocatedNode() const { return nodePtr; }
73  protected:
74  // PROTECTED STATIC METHODS
75  // PROTECTED METHODS
76  // PROTECTED STATIC ATTRIBUTES
77  // PROTECTED ATTRIBUTES
82  }; // end class declaration
83 } // end namespace
84 
85 #endif
Base class for objects that compose a scene graph.
Definition: scenenode.h:25
virtual ~SNLocator()
Definition: snlocator.h:31
const SceneNode * nodePtr
Definition: snlocator.h:81
void AddNodeToPath(SceneNode *nodePtr)
Adds a node to internal Path.
Definition: snlocator.cpp:14
virtual void OperateOn(const SceneNode *nodePtr)=0
Process given node.
bool notFinished
Indicates whether the locator has found the target node.
Definition: snlocator.h:79
Objects that process scene nodes.
Definition: snoperator.h:19
Header file for V-ART class "SnOperator".
bool Finished() const
Indicates whether the traversal has finished.
Definition: snlocator.h:46
Header file for V-ART class "SGPath".
bool NotFinished() const
Indicates whether the traversal has not finished.
Definition: snlocator.h:40
virtual void Reset()
Reverts to initial state.
Definition: snlocator.cpp:19
Scene Node Locator – used to find a particular object in the scene graph.
Definition: snlocator.h:25
Scene Graph Path.
Definition: sgpath.h:23
const SceneNode * LocatedNode() const
Returns the located node.
Definition: snlocator.h:72
const SGPath & Path() const
Returns the path to target node.
Definition: snlocator.h:55