#include <nanoply.hpp>
Public Member Functions | |
bool | AddProperty (std::string &line) |
bool | Contains (NNP_ENTITY entity) |
bool | InitFromHeader (std::string &elemStr, std::vector< std::string > &propStr) |
PlyElement () | |
PlyElement (std::string &_name, std::vector< PlyProperty > &prop, size_t nElem) | |
PlyElement (PlyElemEntity ent, std::vector< PlyProperty > &prop, size_t nElem) | |
bool | SkipAsciiElementsInFile (PlyFile &file) |
bool | SkipBinaryElementsInFile (PlyFile &file) |
bool | WriteHeader (PlyFile &file) |
Public Attributes | |
size_t | cnt |
std::string | name |
PlyElemEntity | plyElem |
std::vector< PlyProperty > | propVec |
bool | validToWrite |
PLY Element. Define a PLY Element as a collection of properties.
Definition at line 1034 of file nanoply.hpp.
nanoply::PlyElement::PlyElement | ( | ) | [inline] |
Default Constructor
Definition at line 1047 of file nanoply.hpp.
nanoply::PlyElement::PlyElement | ( | std::string & | _name, |
std::vector< PlyProperty > & | prop, | ||
size_t | nElem | ||
) | [inline] |
Constructor that sets the name, the properties and the number of instances of the element.
_name | Name of the element. |
prop | Vector of properties. |
nElem | Number of instances. |
Definition at line 1056 of file nanoply.hpp.
nanoply::PlyElement::PlyElement | ( | PlyElemEntity | ent, |
std::vector< PlyProperty > & | prop, | ||
size_t | nElem | ||
) | [inline] |
Constructor that sets the entity, the properties and the number of instances of the element.
ent | Element entity. |
prop | Vector of properties. |
nElem | Number of instances. |
Definition at line 1065 of file nanoply.hpp.
bool nanoply::PlyElement::AddProperty | ( | std::string & | line | ) |
Parse the input line and add the properties to the element. It assumes that the passed line has the folowing structure: "property PLYTYPE PLYELEMENT"
line | Input line. |
Definition at line 1264 of file nanoply.hpp.
bool nanoply::PlyElement::Contains | ( | NNP_ENTITY | entity | ) |
Check if the input entity is in the property of the element.
entity | Input entity. |
Definition at line 1337 of file nanoply.hpp.
bool nanoply::PlyElement::InitFromHeader | ( | std::string & | elemStr, |
std::vector< std::string > & | propStr | ||
) |
Initialize an element from the header line.
elemStr | String with the element definition. |
propStr | Strings with the property definition. |
Definition at line 1119 of file nanoply.hpp.
bool nanoply::PlyElement::SkipAsciiElementsInFile | ( | PlyFile & | file | ) |
Skip the element in an Ascii file.
file | Ply file |
Definition at line 1246 of file nanoply.hpp.
bool nanoply::PlyElement::SkipBinaryElementsInFile | ( | PlyFile & | file | ) |
Skip the element in a binary file.
file | Ply file. |
Definition at line 1255 of file nanoply.hpp.
bool nanoply::PlyElement::WriteHeader | ( | PlyFile & | file | ) |
Write the element descriport in the file header.
file | Ply file. |
Definition at line 1228 of file nanoply.hpp.
size_t nanoply::PlyElement::cnt |
Number of instances of the elment in the PLY file.
Definition at line 1040 of file nanoply.hpp.
std::string nanoply::PlyElement::name |
Name of the elment in the PLY header (for example "vertex", "face", ect.).
Definition at line 1038 of file nanoply.hpp.
Ply element entity.
Definition at line 1039 of file nanoply.hpp.
std::vector<PlyProperty> nanoply::PlyElement::propVec |
Collection of properties that define the element.
Definition at line 1041 of file nanoply.hpp.
Element validity (necessary to write the header).
Definition at line 1042 of file nanoply.hpp.