Public Member Functions | Private Attributes
Sophus::SE3fFormatter Class Reference

#include <formatters.hpp>

Inheritance diagram for Sophus::SE3fFormatter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

SE3fFormatteroperator() (const Sophus::SE3f &s)
 Format a sophus transform with permanently stored precision/width.
SE3fFormatteroperator() (const Sophus::SE3f &s, const int &w, const unsigned int &p)
 Format a matrix with temporarily specified precision/width.
SE3fFormatterprecision (const unsigned int &p)
 Sets the precision format parameter.
unsigned int precision ()
 Returns the current precision setting.
 SE3fFormatter (const int &w=-1, const unsigned int &p=2)
 Default constructor.
SE3fFormatterwidth (const int &w)
 Sets the width format parameter.
int width ()
 Returns the current width setting.
virtual ~SE3fFormatter ()

Private Attributes

ecl::Format< float > format
 Stream the formatter.
bool ready_to_format
const Sophus::SE3f * s_
bool tmp_formatting
unsigned int tmp_precision
int tmp_width

Detailed Description

Formats the se3 in easily readable translation/quaternion syntax.

If you are working with frames, what you usually want to read is the pose of the frame, i.e. the inverse of the transform.

e.g. if you have T_cam_rel_map, to get the pose of the cam frame relative to the map frame, pass T_cam_rel_map.inverse() to this formatter.

Definition at line 38 of file sophus/formatters.hpp.


Constructor & Destructor Documentation

Sophus::SE3fFormatter::SE3fFormatter ( const int &  w = -1,
const unsigned int &  p = 2 
) [inline]

Default constructor.

Initialises the format tags for width, and precision.

Parameters:
w: width (default - no width constraints)
p: the number of decimal places of precision (default - 4)

Definition at line 48 of file sophus/formatters.hpp.

virtual Sophus::SE3fFormatter::~SE3fFormatter ( ) [inline, virtual]

Definition at line 56 of file sophus/formatters.hpp.


Member Function Documentation

SE3fFormatter& Sophus::SE3fFormatter::operator() ( const Sophus::SE3f &  s) [inline]

Format a sophus transform with permanently stored precision/width.

This function directly formats the specified input value with the stored settings.

 cout << format(Sophus::SE3f()) << endl;
Parameters:
matrix: the matrix to be formatted (gets temporarily stored as a pointer).
Returns:
FloatMatrixFormatter& : this formatter readied for use with a stream.

Definition at line 102 of file sophus/formatters.hpp.

SE3fFormatter& Sophus::SE3fFormatter::operator() ( const Sophus::SE3f &  s,
const int &  w,
const unsigned int &  p 
) [inline]

Format a matrix with temporarily specified precision/width.

This function directly formats the specified input value and temporary settings.

 Sophus::SE3f s;
 cout << format(s,3,-1) << endl; // precision of 3 and no width constraint
Parameters:
matrix: the matrix to be formatted (gets temporarily stored as a pointer).
w: the width to use for inserted floats (-1 is no width constraint).
p: the number of decimal places of precision.
Returns:
FloatMatrixFormatter& : this formatter readied for use with a stream.

Definition at line 123 of file sophus/formatters.hpp.

SE3fFormatter& Sophus::SE3fFormatter::precision ( const unsigned int &  p) [inline]

Sets the precision format parameter.

Parameters:
p: the number of decimal places of precision.
Returns:
SE3fFormatter& : this formatter readied for use with a stream.

Definition at line 63 of file sophus/formatters.hpp.

unsigned int Sophus::SE3fFormatter::precision ( ) [inline]

Returns the current precision setting.

Returns:
unsigned int : the precision value.

Definition at line 83 of file sophus/formatters.hpp.

SE3fFormatter& Sophus::SE3fFormatter::width ( const int &  w) [inline]

Sets the width format parameter.

Sets the width format parameter.

Parameters:
w: the width to use for inserted floats (-1 is no width constraint).
Returns:
FloatMatrixFormatter& : this formatter readied for use with a stream.

Definition at line 75 of file sophus/formatters.hpp.

int Sophus::SE3fFormatter::width ( ) [inline]

Returns the current width setting.

Returns:
int : the witdh value (-1 for no width constraint).

Definition at line 89 of file sophus/formatters.hpp.


Member Data Documentation

Stream the formatter.

Insertion operator for sending the formatter to an output stream.

Parameters:
ostream: the output stream.
formatter: the formatter to be inserted.
Template Parameters:
OutputStream: the type of the output stream to be inserted into.
Derived: matrix type.
Returns:
OutputStream : continue streaming with the updated output stream.
Exceptions:
StandardException: throws if the formatter has un-specified _matrix [debug mode only]

Definition at line 145 of file sophus/formatters.hpp.

Definition at line 152 of file sophus/formatters.hpp.

const Sophus::SE3f* Sophus::SE3fFormatter::s_ [private]

Definition at line 153 of file sophus/formatters.hpp.

Definition at line 151 of file sophus/formatters.hpp.

unsigned int Sophus::SE3fFormatter::tmp_precision [private]

Definition at line 150 of file sophus/formatters.hpp.

Definition at line 149 of file sophus/formatters.hpp.


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


ecl_linear_algebra
Author(s): Daniel Stonier
autogenerated on Mon Jul 3 2017 02:21:35