An element (more properly an element type) in the .ply object. Tracks the name of the elemnt type (eg, "vertices"), the number of elements of that type (eg, 1244), and any properties associated with that element (eg, "position", "color").
More...
|
| | Element (const std::string &name_, size_t count_) |
| | Create a new element type. More...
|
| |
| bool | hasProperty (const std::string &target) |
| | Check if a property exists. More...
|
| |
| template<class T > |
| bool | hasPropertyType (const std::string &target) |
| | Check if a property exists with the requested type. More...
|
| |
| std::vector< std::string > | getPropertyNames () |
| | A list of the names of all properties. More...
|
| |
| std::unique_ptr< Property > & | getPropertyPtr (const std::string &target) |
| | Low-level method to get a pointer to a property. Users probably don't need to call this. More...
|
| |
| template<class T > |
| void | addProperty (const std::string &propertyName, const std::vector< T > &data) |
| | Add a new (plain, not list) property for this element type. More...
|
| |
| template<class T > |
| void | addListProperty (const std::string &propertyName, const std::vector< std::vector< T >> &data) |
| | Add a new list property for this element type. More...
|
| |
| template<class T > |
| std::vector< T > | getProperty (const std::string &propertyName) |
| | Get a vector of a data from a property for this element. Automatically promotes to larger types. Throws if requested data is unavailable. More...
|
| |
| template<class T > |
| std::vector< T > | getPropertyType (const std::string &propertyName) |
| | Get a vector of a data from a property for this element. Unlike getProperty(), only returns if the ply record contains a type that matches T exactly. Throws if * requested data is unavailable. More...
|
| |
| template<class T > |
| std::vector< std::vector< T > > | getListProperty (const std::string &propertyName) |
| | Get a vector of lists of data from a property for this element. Automatically promotes to larger types. Throws if requested data is unavailable. More...
|
| |
| template<class T > |
| std::vector< std::vector< T > > | getListPropertyType (const std::string &propertyName) |
| | Get a vector of a data from a property for this element. Unlike getProperty(), only returns if the ply record contains a type that matches T exactly. Throws if * requested data is unavailable. More...
|
| |
| template<class T > |
| std::vector< std::vector< T > > | getListPropertyAnySign (const std::string &propertyName) |
| | Get a vector of lists of data from a property for this element. Automatically promotes to larger types. Unlike getListProperty(), this method will additionally convert between types of different sign (eg, requesting and int32 would get data from a uint32); doing so naively converts between signed and unsigned types. This is typically useful for data representing indices, which might be stored as signed or unsigned numbers. More...
|
| |
|
void | validate () |
| | Performs sanity checks on the element, throwing if any fail.
|
| |
| void | writeHeader (std::ostream &outStream) |
| | Writes out this element's information to the file header. More...
|
| |
| void | writeDataASCII (std::ostream &outStream) |
| | (ASCII writing) Writes out all of the data for every element of this element type to the stream, including all contained properties. More...
|
| |
| void | writeDataBinary (std::ostream &outStream) |
| | (binary writing) Writes out all of the data for every element of this element type to the stream, including all contained properties. More...
|
| |
| void | writeDataBinaryBigEndian (std::ostream &outStream) |
| | (binary writing) Writes out all of the data for every element of this element type to the stream, including all contained properties. More...
|
| |
| template<class D , class T > |
| std::vector< D > | getDataFromPropertyRecursive (Property *prop) |
| | Helper function which does the hard work to implement type promotion for data getters. Throws if type conversion fails. More...
|
| |
| template<class D , class T > |
| std::vector< std::vector< D > > | getDataFromListPropertyRecursive (Property *prop) |
| | Helper function which does the hard work to implement type promotion for list data getters. Throws if type conversion fails. More...
|
| |
An element (more properly an element type) in the .ply object. Tracks the name of the elemnt type (eg, "vertices"), the number of elements of that type (eg, 1244), and any properties associated with that element (eg, "position", "color").