vizkit3d
TransformerGraph.hpp
Go to the documentation of this file.
1 
2 #ifndef __VIZKIT3D_TRANSFORMERGRAPH_HPP__
3 #define __VIZKIT3D_TRANSFORMERGRAPH_HPP__
4 
5 #include <osg/Node>
6 #include <osg/Geometry>
7 
8 #include <vector>
9 #include <string>
10 
11 namespace vizkit3d
12 {
19  {
20  public:
29  static osg::Node *create(const std::string &name);
30 
31 
35  static std::string getWorldName(const osg::Node &transformer);
36 
40  static void setTextSize(osg::Node &transformer, float size);
41 
45  static float getTextSize(osg::Node &transformer);
46 
54  static osg::Node *addFrame(osg::Node &transformer,const std::string &name);
55 
65  static osg::Node *getFrame(osg::Node &transformer,const std::string &name);
66 
76  static osg::Node *getFrame(osg::Node &transformer,osg::Node *node);
77 
87  static osg::Group *getFrameGroup(osg::Node &transformer,const std::string &frame="");
88 
96  static std::string getFrameName(osg::Node &transformer,osg::Node *node);
97 
98  typedef std::pair<std::string, std::string> EdgeDescription;
99  typedef std::list<EdgeDescription> GraphDescription;
100 
104  static GraphDescription getGraphDescription(osg::Node& transformer);
105 
115  static bool setTransformation(osg::Node &transformer,const std::string &source_frame,const std::string &target_frame,
116  const osg::Quat &quat, const osg::Vec3d &trans);
117 
121  static void makeRoot(osg::Node& transformer, std::string const& desiredRoot);
122 
132  static bool getTransformation(osg::Node &transformer,const std::string &source_frame,const std::string &target_frame,
133  osg::Quat &quat, osg::Vec3d &trans);
134 
142  static bool removeFrame(osg::Node &transformer,const std::string &name);
143 
150  static bool hasFrame(osg::Node &transformer,const std::string &name);
151 
157  static std::vector<std::string> getFrameNames(osg::Node &transformer);
158 
165  static void showFrameAnnotation(osg::Node &transformer,bool value);
166 
172  static bool areFrameAnnotationVisible(osg::Node &transformer);
173 
182  static void attachNode(osg::Node &transformer,const std::string &frame,osg::Node &node);
183 
190  static void detachNode(osg::Node &transformer,osg::Node &node);
191 
192  };
193 
194 }
195 
196 #endif
std::pair< std::string, std::string > EdgeDescription
Definition: TransformerGraph.hpp:98
static void showFrameAnnotation(osg::Node &transformer, bool value)
Definition: TransformerGraph.cpp:593
Definition: TransformerGraph.hpp:18
static std::vector< std::string > getFrameNames(osg::Node &transformer)
Definition: TransformerGraph.cpp:588
static bool hasFrame(osg::Node &transformer, const std::string &name)
Definition: TransformerGraph.cpp:583
static osg::Node * getFrame(osg::Node &transformer, const std::string &name)
Definition: TransformerGraph.cpp:374
static void detachNode(osg::Node &transformer, osg::Node &node)
Definition: TransformerGraph.cpp:615
static bool areFrameAnnotationVisible(osg::Node &transformer)
Definition: TransformerGraph.cpp:598
std::list< EdgeDescription > GraphDescription
Definition: TransformerGraph.hpp:99
static osg::Node * create(const std::string &name)
Definition: TransformerGraph.cpp:350
static bool removeFrame(osg::Node &transformer, const std::string &name)
Definition: TransformerGraph.cpp:569
static void setTextSize(osg::Node &transformer, float size)
Definition: TransformerGraph.cpp:410
static osg::Group * getFrameGroup(osg::Node &transformer, const std::string &frame="")
Definition: TransformerGraph.cpp:385
static bool getTransformation(osg::Node &transformer, const std::string &source_frame, const std::string &target_frame, osg::Quat &quat, osg::Vec3d &trans)
Definition: TransformerGraph.cpp:421
static void makeRoot(osg::Node &transformer, std::string const &desiredRoot)
Definition: TransformerGraph.cpp:489
static void attachNode(osg::Node &transformer, const std::string &frame, osg::Node &node)
Definition: TransformerGraph.cpp:605
Definition: AxesNode.cpp:12
static GraphDescription getGraphDescription(osg::Node &transformer)
Definition: TransformerGraph.cpp:355
static osg::Node * addFrame(osg::Node &transformer, const std::string &name)
Definition: TransformerGraph.cpp:363
static std::string getFrameName(osg::Node &transformer, osg::Node *node)
Definition: TransformerGraph.cpp:396
static bool setTransformation(osg::Node &transformer, const std::string &source_frame, const std::string &target_frame, const osg::Quat &quat, const osg::Vec3d &trans)
Definition: TransformerGraph.cpp:498
static float getTextSize(osg::Node &transformer)
Definition: TransformerGraph.cpp:415
static std::string getWorldName(const osg::Node &transformer)
Definition: TransformerGraph.cpp:405