9 #ifndef GEPETTO_VIEWER_ROADMAPVIEWER_HH
10 #define GEPETTO_VIEWER_ROADMAPVIEWER_HH
12 #include <OpenThreads/Mutex>
30 std::list<LeafNodeXYZAxisPtr_t> list_nodes_;
31 std::list<LeafNodeLinePtr_t> list_edges_;
34 RoadmapViewerWeakPtr weak_ptr_;
41 void initWeakPtr(RoadmapViewerWeakPtr other_weak_ptr);
55 static RoadmapViewerPtr_t
create(
const std::string& name,
const osgVector4& colorNode,
float radiusSphere,
float sizeAxis,
const osgVector4& colorEdge);
59 static RoadmapViewerPtr_t
createCopy(RoadmapViewerPtr_t other);
63 virtual RoadmapViewerPtr_t
clone(
void)
const;
67 RoadmapViewerPtr_t
self(void)
const;
95 return list_nodes_.size();
100 return list_edges_.size();
103 virtual LeafNodeXYZAxisPtr_t
getNode(
size_t i)
const
105 std::list<LeafNodeXYZAxisPtr_t>::const_iterator it = list_nodes_.begin();
106 if (list_nodes_.size() > i)
108 std::advance(it, (
long)i);
113 virtual LeafNodeLinePtr_t
getEdge(
size_t i)
const
115 std::list<LeafNodeLinePtr_t>::const_iterator it = list_edges_.begin();
116 if (list_edges_.size() > i)
118 std::advance(it, (
long)i);
124 return radiusSphere_;
144 setColorEdge (color);
Abstract base class of 3D objects in a scene.
Definition: node.h:29
Definition: roadmap-viewer.h:25
virtual LeafNodeLinePtr_t getEdge(size_t i) const
Definition: roadmap-viewer.h:113
virtual size_t getNumOfEdges() const
Definition: roadmap-viewer.h:98
bool addNode(osgVector3 position, osgQuat quat, ::OpenThreads::Mutex &mtx)
static RoadmapViewerPtr_t create(const std::string &name, const osgVector4 &colorNode, float radiusSphere, float sizeAxis, const osgVector4 &colorEdge)
virtual float getRadiusSphere() const
Definition: roadmap-viewer.h:123
virtual float getSizeAxis() const
Definition: roadmap-viewer.h:127
virtual LeafNodeXYZAxisPtr_t getNode(size_t i) const
Definition: roadmap-viewer.h:103
void setColorNode(const osgVector4 &color)
static RoadmapViewerPtr_t createCopy(RoadmapViewerPtr_t other)
virtual void setLightingMode(const LightingMode &lighting_state)
Virtual method for setting the lighting mode of the object : influence by light or not.
virtual osgVector4 getColorNode() const
Definition: roadmap-viewer.h:131
virtual void setVisibilityMode(const VisibilityMode &visibility_state)
Virtual method for setting the visibility mode of the object : visible or not visible.
virtual void setWireFrameMode(const WireFrameMode &wireframe_state)
Virtual method for setting the wireframe mode of the object : visible or not.
void setColorEdge(const osgVector4 &color)
RoadmapViewer(const std::string &name, const osgVector4 &colorNode, float radiusSphere, float sizeAxis, const osgVector4 &colorEdge)
Default constructor.
RoadmapViewer(const RoadmapViewer &other)
virtual size_t getNumOfNodes() const
Definition: roadmap-viewer.h:93
bool addEdge(osgVector3 from, osgVector3 to, ::OpenThreads::Mutex &mtx)
virtual void removeAllChildren()
virtual RoadmapViewerPtr_t clone(void) const
void setColor(const osgVector4 &color)
Definition: roadmap-viewer.h:143
virtual osgVector4 getColorEdge() const
Definition: roadmap-viewer.h:135
::osg::Vec3f osgVector3
Definition: config-osg.h:109
::osg::Quat osgQuat
Definition: config-osg.h:112
::osg::Vec4f osgVector4
Definition: config-osg.h:110
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50
LightingMode
Definition: config-osg.h:125
WireFrameMode
Definition: config-osg.h:131
OpenThreads::Mutex Mutex
Definition: windows-manager.h:30
VisibilityMode
Definition: config-osg.h:118
Definition: action-search-bar.hh:27