g2o
Loading...
Searching...
No Matches
Public Member Functions | List of all members
g2o::VertexPointXYZWriteGnuplotAction Class Reference

#include <vertex_pointxyz.h>

Inheritance diagram for g2o::VertexPointXYZWriteGnuplotAction:
Inheritance graph
[legend]
Collaboration diagram for g2o::VertexPointXYZWriteGnuplotAction:
Collaboration graph
[legend]

Public Member Functions

 VertexPointXYZWriteGnuplotAction ()
 
virtual HyperGraphElementActionoperator() (HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
 
- 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)
 
virtual ~HyperGraphElementAction ()
 
const std::string & typeName () const
 returns the typeid name of the action
 
const std::string & name () const
 returns the name of an action, e.g "draw"
 
void setTypeName (const std::string &typeName_)
 sets the type on which an action has to operate
 

Additional Inherited Members

- Public Types inherited from g2o::HyperGraphElementAction
typedef std::shared_ptr< HyperGraphElementActionHyperGraphElementActionPtr
 
typedef std::map< std::string, HyperGraphElementActionPtrActionMap
 
- Protected Attributes inherited from g2o::HyperGraphElementAction
std::string _typeName
 
std::string _name
 

Detailed Description

Definition at line 80 of file vertex_pointxyz.h.

Constructor & Destructor Documentation

◆ VertexPointXYZWriteGnuplotAction()

g2o::VertexPointXYZWriteGnuplotAction::VertexPointXYZWriteGnuplotAction ( )

Definition at line 91 of file vertex_pointxyz.cpp.

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

Member Function Documentation

◆ operator()()

HyperGraphElementAction * g2o::VertexPointXYZWriteGnuplotAction::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 94 of file vertex_pointxyz.cpp.

96 {
97 if (typeid(*element).name() != _typeName) return nullptr;
98 WriteGnuplotAction::Parameters* params =
99 static_cast<WriteGnuplotAction::Parameters*>(params_);
100 if (!params->os) {
101 return nullptr;
102 }
103
104 VertexPointXYZ* v = static_cast<VertexPointXYZ*>(element);
105 *(params->os) << v->estimate().x() << " " << v->estimate().y() << " "
106 << v->estimate().z() << " " << std::endl;
107 return this;
108}

References g2o::HyperGraphElementAction::_typeName, g2o::BaseVertex< D, T >::estimate(), and g2o::WriteGnuplotAction::Parameters::os.


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