PLYwoot
Header-only C++17 library for parsing and writing PLY files
Loading...
Searching...
No Matches
plywoot::PlyElementData Class Reference

#include <element_data.hpp>

Public Member Functions

 PlyElementData ()=default
 Default constructor.
 
 PlyElementData (const PlyElement &element)
 
 ~PlyElementData ()
 Destructor, deallocates all vectors holding the variable length lists.
 
 PlyElementData (PlyElementData &&x) noexcept
 
PlyElementDataoperator= (PlyElementData &&x) noexcept
 
const PlyElementelement () const
 
std::uint8_t * data () const
 
std::size_t alignment () const
 

Detailed Description

Abstracts a block of memory representing storing all data in a PLY element mapping the data types used in the PLY file directly on native types.

Definition at line 35 of file element_data.hpp.

Constructor & Destructor Documentation

◆ PlyElementData() [1/2]

plywoot::PlyElementData::PlyElementData ( const PlyElement element)
inlineexplicit

Constructs an element data block for the given PLY element. Calculates the total size in bytes of the data block to represent all data in the given PLY element. Note that lists are mapped on to std::vector, so we can pre-calculate the data size of the data block.

Parameters
elementPLY element to construct this instance for

Definition at line 47 of file element_data.hpp.

◆ ~PlyElementData()

plywoot::PlyElementData::~PlyElementData ( )
inline

Destructor, deallocates all vectors holding the variable length lists.

Definition at line 145 of file element_data.hpp.

◆ PlyElementData() [2/2]

plywoot::PlyElementData::PlyElementData ( PlyElementData &&  x)
inlinenoexcept

Move constructor implemented in terms of move assignment for simplicity.

Parameters
xPLY element data instance to construct from

Definition at line 197 of file element_data.hpp.

Member Function Documentation

◆ alignment()

std::size_t plywoot::PlyElementData::alignment ( ) const
inline

Alignment requirements of the elements stored in this memory block in bytes.

Returns
alignment requirements of the elements stored in this memory block in bytes

Definition at line 234 of file element_data.hpp.

◆ data()

std::uint8_t * plywoot::PlyElementData::data ( ) const
inline

Returns a pointer to the memory block storing element data.

Returns
a pointer to the memory block storing element data

Definition at line 227 of file element_data.hpp.

◆ element()

const PlyElement & plywoot::PlyElementData::element ( ) const
inline

Returns the associated element definition.

Returns
the definition of the element associated with this element data instance

Definition at line 222 of file element_data.hpp.

◆ operator=()

PlyElementData & plywoot::PlyElementData::operator= ( PlyElementData &&  x)
inlinenoexcept

Move assignment operator.

Parameters
xPLY element data instance to move assign from
Returns
a reference to this newly assigned element data instance

Definition at line 203 of file element_data.hpp.


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