PLYwoot
Header-only C++17 library for parsing and writing PLY files
|
#include <types.hpp>
Public Member Functions | |
PlyElement ()=default | |
Default constructor. | |
PlyElement (std::string name, std::size_t size) | |
PlyElement (std::string name, std::size_t size, std::vector< PlyProperty > properties) | |
const std::string & | name () const |
std::size_t | size () const |
const std::vector< PlyProperty > & | properties () const |
std::optional< PlyProperty > | property (const std::string &propertyName) const |
template<typename... Args> | |
PlyProperty & | addProperty (Args &&...args) |
Friends | |
bool | operator== (const PlyElement &x, const PlyElement &y) |
bool | operator!= (const PlyElement &x, const PlyElement &y) |
Represents an element stored in a PLY file. An element is a named collection of ordered PLY properties.
|
inline |
|
inline |
Constructor taking a name and size for this element, as well as a list of initial properties to associate with this element.
name | name of the PLY element to construct |
size | the number of instances of this element in the PLY file |
properties | definitions of the PLY properties embedded in this PLY element |
|
inline |
Factory method that constructs a new PLY property definition associated with this PLY element in-place, forwarding the given arguments to the constructor of plywoot::PlyProperty
.
args | arguments to forward to the constructor of plywoot::Property |
|
inline |
|
inline |
|
inline |
Returns a pair where the first element is a copy of the property with the given name in case it exists. The second element is a Boolean that indicates whether the requested property was found. In case a requested property was not found for this element, a default constructed property is returned.
propertyName | name of the property to find the definition for |
|
inline |
|
friend |
Compares the two given PLY element definitions for inequality.
x | left-hand side element definition to compare for inequality with y |
y | right-hand side element definition to compare for inequality with x |
true
in case x
is not equal to y
, false
otherwise
|
friend |