Public Member Functions | Public Attributes
nanoply::PlyElement Class Reference

#include <nanoply.hpp>

List of all members.

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< PlyPropertypropVec
bool validToWrite

Detailed Description

PLY Element. Define a PLY Element as a collection of properties.

Definition at line 1034 of file nanoply.hpp.


Constructor & Destructor Documentation

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.

Parameters:
_nameName of the element.
propVector of properties.
nElemNumber 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.

Parameters:
entElement entity.
propVector of properties.
nElemNumber of instances.

Definition at line 1065 of file nanoply.hpp.


Member Function Documentation

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"

Parameters:
lineInput line.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 1264 of file nanoply.hpp.

Check if the input entity is in the property of the element.

Parameters:
entityInput entity.
Returns:
If successful returns true. Otherwise, it returns false.

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.

Parameters:
elemStrString with the element definition.
propStrStrings with the property definition.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 1119 of file nanoply.hpp.

Skip the element in an Ascii file.

Parameters:
filePly file
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 1246 of file nanoply.hpp.

Skip the element in a binary file.

Parameters:
filePly file.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 1255 of file nanoply.hpp.

Write the element descriport in the file header.

Parameters:
filePly file.
Returns:
If successful returns true. Otherwise, it returns false.

Definition at line 1228 of file nanoply.hpp.


Member Data Documentation

Number of instances of the elment in the PLY file.

Definition at line 1040 of file nanoply.hpp.

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.

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.


The documentation for this class was generated from the following file:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:09