node-visitor.h
Go to the documentation of this file.
1 //
2 // node-visitor.h
3 // gepetto-viewer
4 //
5 // Created by Joseph Mirabel in November 2015.
6 // Copyright (c) 2015 LAAS-CNRS. All rights reserved.
7 //
8 
9 #ifndef GEPETTO_VIEWER_NODE_VISITOR_HH
10 #define GEPETTO_VIEWER_NODE_VISITOR_HH
11 
12 #include <iostream>
14 
15 namespace gepetto {
16 namespace viewer {
17  class Node;
18  class GroupNode;
19  class LeafNodeArrow;
20  class LeafNodeBox;
21  class LeafNodeCapsule;
22  class LeafNodeCollada;
23  class LeafNodeCone;
24  class LeafNodeCylinder;
25  class LeafNodeFace;
26  class LeafNodeGround;
27  class LeafNodeLight;
28  class LeafNodeLine;
29  class LeafNodeSphere;
30  class LeafNodeXYZAxis;
31 
32 
33  DEF_CLASS_SMART_PTR(NodeVisitor)
34 
35  class NodeVisitor : public osg::Referenced
36  {
37  public:
38  NodeVisitor (bool invisibleAreValid = true) : invisibleAreValid_(invisibleAreValid) {}
39 
40  virtual ~NodeVisitor () {}
41 
42  virtual void apply (Node& node);
43  virtual void apply (GroupNode& node);
44  virtual void apply (LeafNodeArrow& node);
45  virtual void apply (LeafNodeBox& node);
46  virtual void apply (LeafNodeCapsule& node);
47  virtual void apply (LeafNodeCollada& node);
48  virtual void apply (LeafNodeCone& node);
49  virtual void apply (LeafNodeCylinder& node);
50  virtual void apply (LeafNodeFace& node);
51  virtual void apply (LeafNodeGround& node);
52  virtual void apply (LeafNodeLight& node);
53  virtual void apply (LeafNodeLine& node);
54  virtual void apply (LeafNodeSphere& node);
55  virtual void apply (LeafNodeXYZAxis& node);
56 
57  virtual bool valid (Node& node);
58 
59  void traverse (Node& node);
60 
61  protected:
63  }; /* class Node */
64 } /* namespace viewer */
65 } /* namespace gepetto */
66 
67 #endif /* GEPETTO_VIEWER_NODE_VISITOR_HH */
bool invisibleAreValid_
Definition: node-visitor.h:62
Definition: leaf-node-xyzaxis.h:21
Definition: leaf-node-collada.h:21
Definition: leaf-node-cone.h:19
Definition: leaf-node-ground.h:18
Definition: leaf-node-light.h:20
Definition: leaf-node-box.h:19
Definition: node-visitor.h:35
Definition: leaf-node-face.h:20
Definition: action-search-bar.hh:27
Definition: leaf-node-cylinder.h:19
Definition: leaf-node-line.h:18
Definition: leaf-node-sphere.h:19
NodeVisitor(bool invisibleAreValid=true)
Definition: node-visitor.h:38
Definition: leaf-node-capsule.h:21
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50
Definition: config-osg.h:52
Definition: group-node.h:19
Abstract base class of 3D objects in a scene.
Definition: node.h:27
virtual ~NodeVisitor()
Definition: node-visitor.h:40
Definition: leaf-node-arrow.h:20