PLY reader/writer  1.2.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Public Member Functions | Public Attributes | List of all members
PLY::Header Struct Reference

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...
 
Elementfind_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< Elementelements
 List of data Elements.
 
std::vector< std::string > comments
 List of comments.
 
std::vector< std::string > obj_info
 List of object info descriptions.
 

Detailed Description

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.

See Also
Element

Constructor & Destructor Documentation

PLY::Header::Header ( )
inline

Default constructor.

The default stream_type is ASCII.

Member Function Documentation

void PLY::Header::add_element ( const Element elem)
inline

Add an Element to the Header.

Parameters
elemthe Element to add.
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.

Parameters
[in,out]ptra pointer to the byte-array.
nthe number of bytes to consider.
Element * PLY::Header::find_element ( const char *  name)

Find an Element.

Parameters
namethe name of the Element to find.
Returns
the Element, or NULL if the Header does not contain the Element.
bool PLY::Header::find_index ( const char *  name,
size_t &  index 
) const

Find the index of an Element.

Parameters
namethe name of the Element to find.
[out]indexthe index of the Element.
Returns
true if the name refers to a Element of this Header.
Stream_type PLY::Header::system ( ) const
inline

Get the binary storage-mode of the system.

Returns
the binary mode of the system.

The documentation for this struct was generated from the following files: