Euclid
Geometry Processing and Shape Analysis in C++
|
Off I/O. More...
Functions | |
template<int N, typename FT , typename IT , typename CT , typename Interface > | |
void | Euclid::read_off (const std::string &filename, std::vector< FT > &positions, std::vector< CT > *vcolors, std::vector< IT > *findices, std::vector< CT > *fcolors) |
Read off file. More... | |
template<int N, typename FT , typename IT , typename CT , typename Interface > | |
void | Euclid::write_off (const std::string &filename, const std::vector< FT > &positions, const std::vector< CT > *vcolors, const std::vector< IT > *findices, const std::vector< CT > *fcolors) |
Write off file. More... | |
Off is a simple geometry file format storing positions, indices, and optionally colors.
void Euclid::read_off | ( | const std::string & | filename, |
std::vector< FT > & | positions, | ||
std::vector< CT > * | vcolors, | ||
std::vector< IT > * | findices, | ||
std::vector< CT > * | fcolors | ||
) |
Off file can store positions, indices, vertex colors and face colors. Note that index count can vary per face, but it's asumed to be fixed for all faces by this reader. Also note that off file format can store edge indices, which is often 0, thus omitted by this reader.
N | Number of vertices per face. |
FT | Type of floating point value. |
IT | Type of index value. |
CT | Type of color value. |
Interface | User should never specify the type for it. |
filename | Input file name. |
positions | Vertex positions. |
vcolors | Vertex colors, including r, g, b, a. Use nullptr if you don't want to read them. |
findices | Face indices. Use nullptr if you don't want to read them. |
fcolors | Face colors, including r, g, b, a. Use nullptr if you don't want to read them. |
Note
Proper overloading functions are implemented so that it's not necessary to provide template parameters even if nullptr is used.
void Euclid::write_off | ( | const std::string & | filename, |
const std::vector< FT > & | positions, | ||
const std::vector< CT > * | vcolors, | ||
const std::vector< IT > * | findices, | ||
const std::vector< CT > * | fcolors | ||
) |
Off file can store positions, indices, vertex colors and face colors. Note that index count can vary per face, but it's asumed to be fixed for all faces by this reader. Also note that off file format can store edge indices, which is often 0, thus omitted by this reader.
N | Number of vertices per face. |
FT | Type of floating point value. |
IT | Type of index value. |
CT | Type of color value. |
Interface | User should never specify the type for it. |
filename | Input file name. |
positions | Vertex positions. |
vcolors | Vertex colors, including r, g, b, a. Use nullptr if you don't want to write them. |
findices | Face indices. Use nullptr if you don't want to write them. |
fcolors | Face colors, including r, g, b, a. Use nullptr if you don't want to write them. |
Note
Proper overloading functions are implemented so that it's not necessary to provide template parameters even if nullptr is used.