36 leftCamera.saveToConfigFile(section +
string(
"_LEFT"), cfg);
37 rightCamera.saveToConfigFile(section +
string(
"_RIGHT"), cfg);
44 section +
string(
"_LEFT2RIGHT_POSE"),
"pose_quaternion",
q.asString());
60 leftCamera.loadFromConfigFile(section +
string(
"_LEFT"), cfg);
61 rightCamera.loadFromConfigFile(section +
string(
"_RIGHT"), cfg);
62 rightCameraPose.fromString(
64 section +
string(
"_LEFT2RIGHT_POSE"),
"pose_quaternion",
""));
74 out << leftCamera << rightCamera << rightCameraPose;
92 in >> leftCamera >> rightCamera >> rightCameraPose;
103 saveToConfigFile(
"", cfg);
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
GLdouble GLdouble GLdouble GLdouble q
std::string read_string(const std::string §ion, const std::string &name, const std::string &defaultValue, bool failIfNotFound=false) const
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
Structure to hold the parameters of a pinhole stereo camera model.
This class allows loading and storing values and vectors of different types from a configuration text...
This class implements a config file-like interface over a memory-stored string list.
void getContent(std::string &str) const
Return the current contents of the virtual "config file".
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
std::string dumpAsText() const
Dumps all the parameters as a multi-line string, with the same format than saveToConfigFile.
A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void write(const std::string §ion, const std::string &name, enum_t value, const int name_padding_width=-1, const int value_padding_width=-1, const std::string &comment=std::string())
void loadFromConfigFile(const std::string §ion, const mrpt::utils::CConfigFileBase &cfg)
Load all the params from a config source, in the same format that used in saveToConfigFile().
void saveToConfigFile(const std::string §ion, mrpt::utils::CConfigFileBase &cfg) const
Save all params to a plain text config file in this format: