Simox  2.3.74.0
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

◆ read()

template<typename T >
T VirtualRobot::FileIO::read ( std::ifstream &  file)
inline

◆ readArray()

template<typename T >
void VirtualRobot::FileIO::readArray ( T *  res,
int  num,
std::ifstream &  file 
)
inline

◆ readMatrix4f()

bool VirtualRobot::FileIO::readMatrix4f ( Eigen::Matrix4f &  res,
std::ifstream &  file 
)
inline

◆ readPts()

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.

◆ readString()

bool VirtualRobot::FileIO::readString ( std::string &  res,
std::ifstream &  file 
)
inline

◆ write()

template<typename T >
void VirtualRobot::FileIO::write ( std::ofstream &  file,
value 
)
inline

◆ writeArray()

template<typename T >
void VirtualRobot::FileIO::writeArray ( std::ofstream &  file,
const T *  value,
int  num 
)
inline

◆ writeMatrix4f()

void VirtualRobot::FileIO::writeMatrix4f ( std::ofstream &  file,
const Eigen::Matrix4f &  m 
)
inline

◆ writeString()

void VirtualRobot::FileIO::writeString ( std::ofstream &  file,
const std::string &  value 
)
inline