g2o
Public Member Functions | List of all members
g2o::deprecated::EdgeSE3WriteGnuplotAction Class Reference

#include <edge_se3_quat.h>

Inheritance diagram for g2o::deprecated::EdgeSE3WriteGnuplotAction:
Inheritance graph
[legend]
Collaboration diagram for g2o::deprecated::EdgeSE3WriteGnuplotAction:
Collaboration graph
[legend]

Public Member Functions

 EdgeSE3WriteGnuplotAction ()
 
virtual HyperGraphElementActionoperator() (HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
 redefine this to do the action stuff. If successful, the action returns a pointer to itself More...
 
- Public Member Functions inherited from g2o::WriteGnuplotAction
 WriteGnuplotAction (const std::string &typeName_)
 
- Public Member Functions inherited from g2o::HyperGraphElementAction
 HyperGraphElementAction (const std::string &typeName_="")
 
virtual HyperGraphElementActionoperator() (const HyperGraph::HyperGraphElement *element, Parameters *parameters)
 redefine this to do the action stuff. If successful, the action returns a pointer to itself More...
 
virtual ~HyperGraphElementAction ()
 destroyed actions release the memory More...
 
const std::string & typeName () const
 returns the typeid name of the action More...
 
const std::string & name () const
 returns the name of an action, e.g "draw" More...
 
void setTypeName (const std::string &typeName_)
 sets the type on which an action has to operate More...
 

Additional Inherited Members

- Public Types inherited from g2o::HyperGraphElementAction
typedef std::map< std::string, HyperGraphElementAction * > ActionMap
 
- Protected Attributes inherited from g2o::HyperGraphElementAction
std::string _typeName
 
std::string _name
 

Detailed Description

Definition at line 101 of file edge_se3_quat.h.

Constructor & Destructor Documentation

g2o::deprecated::EdgeSE3WriteGnuplotAction::EdgeSE3WriteGnuplotAction ( )

Definition at line 119 of file edge_se3_quat.cpp.

119 : WriteGnuplotAction(typeid(EdgeSE3).name()){}
const std::string & name() const
returns the name of an action, e.g "draw"
WriteGnuplotAction(const std::string &typeName_)

Member Function Documentation

HyperGraphElementAction * g2o::deprecated::EdgeSE3WriteGnuplotAction::operator() ( HyperGraph::HyperGraphElement element,
HyperGraphElementAction::Parameters parameters 
)
virtual

redefine this to do the action stuff. If successful, the action returns a pointer to itself

Reimplemented from g2o::HyperGraphElementAction.

Definition at line 121 of file edge_se3_quat.cpp.

References __PRETTY_FUNCTION__, g2o::HyperGraphElementAction::_typeName, g2o::BaseVertex< D, T >::estimate(), g2o::HyperGraphElementAction::name(), g2o::WriteGnuplotAction::Parameters::os, g2o::SE3Quat::rotation(), g2o::SE3Quat::translation(), and g2o::HyperGraph::Edge::vertex().

121  {
122  if (typeid(*element).name()!=_typeName)
123  return 0;
124  WriteGnuplotAction::Parameters* params=static_cast<WriteGnuplotAction::Parameters*>(params_);
125  if (!params->os){
126  std::cerr << __PRETTY_FUNCTION__ << ": warning, on valid os specified" << std::endl;
127  return 0;
128  }
129 
130  EdgeSE3* e = static_cast<EdgeSE3*>(element);
131  VertexSE3* fromEdge = static_cast<VertexSE3*>(e->vertex(0));
132  VertexSE3* toEdge = static_cast<VertexSE3*>(e->vertex(1));
133  *(params->os) << fromEdge->estimate().translation().x() << " "
134  << fromEdge->estimate().translation().y() << " "
135  << fromEdge->estimate().translation().z() << " ";
136  *(params->os) << fromEdge->estimate().rotation().x() << " "
137  << fromEdge->estimate().rotation().y() << " "
138  << fromEdge->estimate().rotation().z() << " " << std::endl;
139  *(params->os) << toEdge->estimate().translation().x() << " "
140  << toEdge->estimate().translation().y() << " "
141  << toEdge->estimate().translation().z() << " ";
142  *(params->os) << toEdge->estimate().rotation().x() << " "
143  << toEdge->estimate().rotation().y() << " "
144  << toEdge->estimate().rotation().z() << " " << std::endl;
145  *(params->os) << std::endl;
146  return this;
147  }
#define __PRETTY_FUNCTION__
Definition: macros.h:89

The documentation for this class was generated from the following files: