Simox  2.3.50
VirtualRobot::FileIO Namespace Reference

Functions

template<typename T >
read (std::ifstream &file)
 
template<typename T >
void readArray (T *res, int num, std::ifstream &file)
 
template<typename T >
void write (std::ofstream &file, T value)
 
template<typename T >
void writeArray (std::ofstream &file, const T *value, int num)
 
bool readString (std::string &res, std::ifstream &file)
 
bool readMatrix4f (Eigen::Matrix4f &res, std::ifstream &file)
 
void writeMatrix4f (std::ofstream &file, const Eigen::Matrix4f &m)
 
void writeString (std::ofstream &file, const std::string &value)
 
std::vector< Eigen::Vector3f > VIRTUAL_ROBOT_IMPORT_EXPORT readPts (const std::string &filename, const char separator= ' ')
 

Function Documentation

template<typename T >
T VirtualRobot::FileIO::read ( std::ifstream &  file)
inline
template<typename T >
void VirtualRobot::FileIO::readArray ( T *  res,
int  num,
std::ifstream &  file 
)
inline
bool VirtualRobot::FileIO::readMatrix4f ( Eigen::Matrix4f &  res,
std::ifstream &  file 
)
inline
std::vector< Eigen::Vector3f > VirtualRobot::FileIO::readPts ( const std::string &  filename,
const char  separator = ' ' 
)

Read points form ascii file. Each row defines one point triple.

Parameters
filenameThe absolute filename.
separatorSeparator character. Standard space, but comma or semicolon could be passed here.
Returns
Vector of points.
bool VirtualRobot::FileIO::readString ( std::string &  res,
std::ifstream &  file 
)
inline
template<typename T >
void VirtualRobot::FileIO::write ( std::ofstream &  file,
value 
)
inline
template<typename T >
void VirtualRobot::FileIO::writeArray ( std::ofstream &  file,
const T *  value,
int  num 
)
inline
void VirtualRobot::FileIO::writeMatrix4f ( std::ofstream &  file,
const Eigen::Matrix4f &  m 
)
inline
void VirtualRobot::FileIO::writeString ( std::ofstream &  file,
const std::string &  value 
)
inline