The Header of a ply file. More...
#include <header.h>
Public Member Functions | |
Header () | |
Default constructor. More... | |
Stream_type | system () const |
Get the binary storage-mode of the system. More... | |
void | add_element (const Element &elem) |
Add an Element to the Header. More... | |
bool | find_index (const char *name, size_t &index) const |
Find the index of an Element. More... | |
Element * | find_element (const char *name) |
Find an Element. More... | |
void | apply_stream_type (char *ptr, size_t n) |
Apply the stream mode. More... | |
Public Attributes | |
float | version |
The PLY version of the file. | |
Stream_type | stream_type |
How the data is stored. | |
std::vector< Element > | elements |
List of data Elements. | |
std::vector< std::string > | comments |
List of comments. | |
std::vector< std::string > | obj_info |
List of object info descriptions. | |
The Header of a ply file.
The Header describes the Elements that a file contains. This includes a description of all the Properties of the Elements.
The Header also contains the ply version and modality in which the data is stored, as well as any comments on the file.
|
inline |
Default constructor.
The default stream_type is ASCII.
|
inline |
void PLY::Header::apply_stream_type | ( | char * | ptr, |
size_t | n | ||
) |
Apply the stream mode.
This will adjust a byte-array such that it is read or stored correctly in binary mode.
This depends on the stream_type and binary mode of the system.
[in,out] | ptr | a pointer to the byte-array. |
n | the number of bytes to consider. |
Element * PLY::Header::find_element | ( | const char * | name) |
bool PLY::Header::find_index | ( | const char * | name, |
size_t & | index | ||
) | const |
|
inline |
Get the binary storage-mode of the system.