Line |
Branch |
Exec |
Source |
1 |
|
|
// Copyright (c) 2015, Joseph Mirabel |
2 |
|
|
// Authors: Joseph Mirabel (joseph.mirabel@laas.fr) |
3 |
|
|
// |
4 |
|
|
// This file is part of gepetto-viewer. |
5 |
|
|
// gepetto-viewer is free software: you can redistribute it |
6 |
|
|
// and/or modify it under the terms of the GNU Lesser General Public |
7 |
|
|
// License as published by the Free Software Foundation, either version |
8 |
|
|
// 3 of the License, or (at your option) any later version. |
9 |
|
|
// |
10 |
|
|
// gepetto-viewer is distributed in the hope that it will be |
11 |
|
|
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
12 |
|
|
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 |
|
|
// General Lesser Public License for more details. You should have |
14 |
|
|
// received a copy of the GNU Lesser General Public License along with |
15 |
|
|
// gepetto-viewer. If not, see <http://www.gnu.org/licenses/>. |
16 |
|
|
|
17 |
|
|
#include <gepetto/viewer/group-node.h> |
18 |
|
|
#include <gepetto/viewer/leaf-node-arrow.h> |
19 |
|
|
#include <gepetto/viewer/leaf-node-box.h> |
20 |
|
|
#include <gepetto/viewer/leaf-node-capsule.h> |
21 |
|
|
#include <gepetto/viewer/leaf-node-collada.h> |
22 |
|
|
#include <gepetto/viewer/leaf-node-cone.h> |
23 |
|
|
#include <gepetto/viewer/leaf-node-cylinder.h> |
24 |
|
|
#include <gepetto/viewer/leaf-node-face.h> |
25 |
|
|
#include <gepetto/viewer/leaf-node-ground.h> |
26 |
|
|
#include <gepetto/viewer/leaf-node-light.h> |
27 |
|
|
#include <gepetto/viewer/leaf-node-line.h> |
28 |
|
|
#include <gepetto/viewer/leaf-node-sphere.h> |
29 |
|
|
#include <gepetto/viewer/leaf-node-xyzaxis.h> |
30 |
|
|
#include <gepetto/viewer/node-rod.h> |
31 |
|
|
#include <gepetto/viewer/node-visitor.h> |
32 |
|
|
#include <gepetto/viewer/node.h> |
33 |
|
|
#include <gepetto/viewer/roadmap-viewer.h> |
34 |
|
|
|
35 |
|
|
namespace gepetto { |
36 |
|
|
namespace viewer { |
37 |
|
|
|
38 |
|
✗ |
void NodeVisitor::apply(Node& node) { traverse(node); } |
39 |
|
✗ |
void NodeVisitor::apply(GroupNode& node) { apply(static_cast<Node&>(node)); } |
40 |
|
✗ |
void NodeVisitor::apply(LeafNodeArrow& node) { |
41 |
|
✗ |
apply(static_cast<Node&>(node)); |
42 |
|
|
} |
43 |
|
✗ |
void NodeVisitor::apply(LeafNodeBox& node) { apply(static_cast<Node&>(node)); } |
44 |
|
✗ |
void NodeVisitor::apply(LeafNodeCapsule& node) { |
45 |
|
✗ |
apply(static_cast<Node&>(node)); |
46 |
|
|
} |
47 |
|
✗ |
void NodeVisitor::apply(LeafNodeCollada& node) { |
48 |
|
✗ |
apply(static_cast<Node&>(node)); |
49 |
|
|
} |
50 |
|
✗ |
void NodeVisitor::apply(LeafNodeCone& node) { apply(static_cast<Node&>(node)); } |
51 |
|
✗ |
void NodeVisitor::apply(LeafNodeCylinder& node) { |
52 |
|
✗ |
apply(static_cast<Node&>(node)); |
53 |
|
|
} |
54 |
|
✗ |
void NodeVisitor::apply(LeafNodeFace& node) { apply(static_cast<Node&>(node)); } |
55 |
|
✗ |
void NodeVisitor::apply(LeafNodeGround& node) { |
56 |
|
✗ |
apply(static_cast<Node&>(node)); |
57 |
|
|
} |
58 |
|
✗ |
void NodeVisitor::apply(LeafNodeLight& node) { |
59 |
|
✗ |
apply(static_cast<Node&>(node)); |
60 |
|
|
} |
61 |
|
✗ |
void NodeVisitor::apply(LeafNodeLine& node) { apply(static_cast<Node&>(node)); } |
62 |
|
✗ |
void NodeVisitor::apply(LeafNodeSphere& node) { |
63 |
|
✗ |
apply(static_cast<Node&>(node)); |
64 |
|
|
} |
65 |
|
✗ |
void NodeVisitor::apply(LeafNodeXYZAxis& node) { |
66 |
|
✗ |
apply(static_cast<Node&>(node)); |
67 |
|
|
} |
68 |
|
✗ |
bool NodeVisitor::valid(Node& node) { |
69 |
|
✗ |
if (invisibleAreValid_ || node.getVisibilityMode() != VISIBILITY_OFF) |
70 |
|
✗ |
return true; |
71 |
|
✗ |
return false; |
72 |
|
|
} |
73 |
|
✗ |
void NodeVisitor::traverse(Node& node) { node.traverse(*this); } |
74 |
|
|
} // namespace viewer |
75 |
|
|
} // namespace gepetto |
76 |
|
|
|