gepetto-viewer  6.0.0
An user-friendly Graphical Interface
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 
13 
14 #include <iostream>
15 
16 namespace gepetto {
17 namespace viewer {
18 class Node;
19 class GroupNode;
20 class LeafNodeArrow;
21 class LeafNodeBox;
22 class LeafNodeCapsule;
23 class LeafNodeCollada;
24 class LeafNodeCone;
25 class LeafNodeCylinder;
26 class LeafNodeFace;
27 class LeafNodeGround;
28 class LeafNodeLight;
29 class LeafNodeLine;
30 class LeafNodeSphere;
31 class LeafNodeXYZAxis;
32 
33 DEF_CLASS_SMART_PTR(NodeVisitor)
34 
35 class NodeVisitor : public osg::Referenced {
36  public:
37  NodeVisitor(bool invisibleAreValid = true)
38  : 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 */
Definition: group-node.h:19
Definition: leaf-node-arrow.h:20
Definition: leaf-node-box.h:19
Definition: leaf-node-capsule.h:21
Definition: leaf-node-collada.h:22
Definition: leaf-node-cone.h:19
Definition: leaf-node-cylinder.h:19
Definition: leaf-node-face.h:20
Definition: leaf-node-ground.h:18
Definition: leaf-node-light.h:20
Definition: leaf-node-line.h:19
Definition: leaf-node-sphere.h:19
Definition: leaf-node-xyzaxis.h:22
Definition: node-visitor.h:35
virtual void apply(LeafNodeCollada &node)
NodeVisitor(bool invisibleAreValid=true)
Definition: node-visitor.h:37
virtual void apply(LeafNodeGround &node)
virtual void apply(LeafNodeCapsule &node)
virtual void apply(Node &node)
virtual void apply(GroupNode &node)
virtual void apply(LeafNodeLine &node)
virtual ~NodeVisitor()
Definition: node-visitor.h:40
virtual void apply(LeafNodeSphere &node)
bool invisibleAreValid_
Definition: node-visitor.h:62
virtual void apply(LeafNodeBox &node)
virtual bool valid(Node &node)
virtual void apply(LeafNodeFace &node)
virtual void apply(LeafNodeArrow &node)
virtual void apply(LeafNodeXYZAxis &node)
virtual void apply(LeafNodeLight &node)
virtual void apply(LeafNodeCone &node)
virtual void apply(LeafNodeCylinder &node)
Abstract base class of 3D objects in a scene.
Definition: node.h:25
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:51
Definition: action-search-bar.hh:27
Definition: config-osg.h:44