uvgVPCCenc 1.0.0
uvgVPCCenc is an open-source real-time V-PCC encoder library written in C++ from scratch.
|
#include <miniply.h>
Public Member Functions | |
void | calculate_offsets () |
uint32_t | find_property (const char *propName) const |
bool | find_properties (uint32_t propIdxs[], uint32_t numIdxs,...) const |
bool | find_properties_va (uint32_t propIdxs[], uint32_t numIdxs, va_list names) const |
bool | convert_list_to_fixed_size (uint32_t listPropIdx, uint32_t listSize, uint32_t newPropIdxs[]) |
Public Attributes | |
std::string | name |
Name of this element. | |
std::vector< PLYProperty > | properties |
uint32_t | count = 0 |
The number of items in this element (e.g. the number of vertices if this is the vertex element). | |
bool | fixedSize = true |
true if there are only fixed-size properties in this element, i.e. no list properties. | |
uint32_t | rowStride = 0 |
The number of bytes from the start of one row to the start of the next, for this element. | |
void miniply::PLYElement::calculate_offsets | ( | ) |
bool miniply::PLYElement::convert_list_to_fixed_size | ( | uint32_t | listPropIdx, |
uint32_t | listSize, | ||
uint32_t | newPropIdxs[] | ||
) |
Call this on the element at some point before you load its data, when you know that every row's list will have the same length. It will replace the single variable-size property with a set of new fixed-size properties: one for the list count, followed by one for each of the list values. This will allow miniply to load and extract the property data a lot more efficiently, giving a big performance increase.
After you've called this, you must use PLYReader's extract_columns
method to get the data, rather than extract_list_column
.
The newPropIdxs
parameter must be an array with at least listSize
entries. If the function returns true, this will have been populated with the indices of the new properties that represent the list values (i.e. not including the list count property, which will have the same index as the old list property).
The function returns false if the property index is invalid, or the property it refers to is not a list property. In these cases it will not modify anything. Otherwise it will return true.
bool miniply::PLYElement::find_properties | ( | uint32_t | propIdxs[], |
uint32_t | numIdxs, | ||
... | |||
) | const |
Return the indices for several properties in one go. Use it like this:
propIdxs
is where the property indexes will be stored. numIdxs
is the number of properties we will look up. There must be exactly numIdxs
parameters after numIdxs
; each of the is a c-style string giving the name of a property.
The return value will be true if all properties were found. If it was not true, you should not use any values from propIdxs.
bool miniply::PLYElement::find_properties_va | ( | uint32_t | propIdxs[], |
uint32_t | numIdxs, | ||
va_list | names | ||
) | const |
Same as find_properties
, for when you already have a va_list
. This is called internally by both PLYElement::find_properties
and PLYReader::find_properties
.
uint32_t miniply::PLYElement::find_property | ( | const char * | propName | ) | const |
Returns the index for the named property in this element, or kInvalidIndex
if it can't be found.
uint32_t miniply::PLYElement::count = 0 |
The number of items in this element (e.g. the number of vertices if this is the vertex element).
bool miniply::PLYElement::fixedSize = true |
true
if there are only fixed-size properties in this element, i.e. no list properties.
std::string miniply::PLYElement::name |
Name of this element.
std::vector<PLYProperty> miniply::PLYElement::properties |
uint32_t miniply::PLYElement::rowStride = 0 |
The number of bytes from the start of one row to the start of the next, for this element.