#include <formatters.hpp>
Public Member Functions | |
SE3fFormatter & | operator() (const Sophus::SE3f &s) |
Format a sophus transform with permanently stored precision/width. More... | |
SE3fFormatter & | operator() (const Sophus::SE3f &s, const int &w, const unsigned int &p) |
Format a matrix with temporarily specified precision/width. More... | |
unsigned int | precision () |
Returns the current precision setting. More... | |
SE3fFormatter & | precision (const unsigned int &p) |
Sets the precision format parameter. More... | |
SE3fFormatter (const int &w=-1, const unsigned int &p=2) | |
Default constructor. More... | |
int | width () |
Returns the current width setting. More... | |
SE3fFormatter & | width (const int &w) |
Sets the width format parameter. More... | |
virtual | ~SE3fFormatter () |
Private Attributes | |
ecl::Format< float > | format |
bool | ready_to_format |
const Sophus::SE3f * | s_ |
bool | tmp_formatting |
unsigned int | tmp_precision |
int | tmp_width |
Friends | |
template<typename OutputStream > | |
OutputStream & | operator<< (OutputStream &ostream, SE3fFormatter &formatter) |
Stream the formatter. More... | |
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 44 of file sophus/formatters.hpp.
|
inline |
Default constructor.
Initialises the format tags for width, and precision.
w | : width (default - no width constraints) |
p | : the number of decimal places of precision (default - 4) |
Definition at line 62 of file sophus/formatters.hpp.
|
inlinevirtual |
Definition at line 70 of file sophus/formatters.hpp.
|
inline |
Format a sophus transform with permanently stored precision/width.
This function directly formats the specified input value with the stored settings.
matrix | : the matrix to be formatted (gets temporarily stored as a pointer). |
Definition at line 116 of file sophus/formatters.hpp.
|
inline |
Format a matrix with temporarily specified precision/width.
This function directly formats the specified input value and temporary settings.
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. |
Definition at line 137 of file sophus/formatters.hpp.
|
inline |
Returns the current precision setting.
Definition at line 97 of file sophus/formatters.hpp.
|
inline |
Sets the precision format parameter.
p | : the number of decimal places of precision. |
Definition at line 77 of file sophus/formatters.hpp.
|
inline |
Returns the current width setting.
Definition at line 103 of file sophus/formatters.hpp.
|
inline |
Sets the width format parameter.
Sets the width format parameter.
w | : the width to use for inserted floats (-1 is no width constraint). |
Definition at line 89 of file sophus/formatters.hpp.
|
friend |
Stream the formatter.
Insertion operator for sending the formatter to an output stream.
ostream | : the output stream. |
formatter | : the formatter to be inserted. |
OutputStream | : the type of the output stream to be inserted into. |
Derived | : matrix type. |
StandardException | : throws if the formatter has un-specified _matrix [debug mode only] |
Definition at line 163 of file sophus/formatters.hpp.
|
private |
Definition at line 162 of file sophus/formatters.hpp.
|
private |
Definition at line 166 of file sophus/formatters.hpp.
|
private |
Definition at line 167 of file sophus/formatters.hpp.
|
private |
Definition at line 165 of file sophus/formatters.hpp.
|
private |
Definition at line 164 of file sophus/formatters.hpp.
|
private |
Definition at line 163 of file sophus/formatters.hpp.