|
| | PropertyTablePropertyView () |
| | Constructs an invalid instance for a non-existent property.
|
| |
| | PropertyTablePropertyView (PropertyViewStatusType status) |
| | Constructs an invalid instance for an erroneous property.
|
| |
| | PropertyTablePropertyView (const ClassProperty &classProperty, int64_t size) |
| | Constructs an instance of an empty property that specifies a default value. Although this property has no data, it can return the default value when PropertyTablePropertyView<ElementType, true>::get is called. However, PropertyTablePropertyView<ElementType, true>::getRaw cannot be used.
|
| |
| | PropertyTablePropertyView (const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values) noexcept |
| | Construct an instance pointing to data specified by a PropertyTableProperty. Used for non-array or fixed-length array data.
|
| |
| | PropertyTablePropertyView (const PropertyTableProperty &property, const ClassProperty &classProperty, int64_t size, std::span< const std::byte > values, std::span< const std::byte > arrayOffsets, PropertyComponentType arrayOffsetType) noexcept |
| | Construct an instance pointing to the data specified by a PropertyTableProperty.
|
| |
| std::optional< PropertyValueViewToCopy< NormalizedType > > | get (int64_t index) const noexcept |
| | Get the value of an element of the PropertyTable, with normalization and other value transforms applied. In other words, the value will be normalized, then transformed by the property's offset and scale, if they are defined.
|
| |
| ElementType | getRaw (int64_t index) const noexcept |
| | Get the raw value of an element of the PropertyTable, without offset, scale, or normalization applied.
|
| |
| int64_t | size () const noexcept |
| | Get the number of elements in this PropertyTablePropertyView. If the view is valid, this returns PropertyTable::count. Otherwise, this returns 0.
|
| |
| | PropertyView () |
| | Constructs an empty property instance.
|
| |
| | PropertyView (const ClassProperty &classProperty) |
| | Constructs a property instance from a class definition only.
|
| |
| PropertyViewStatusType | status () const noexcept |
| | Constructs an empty property instance. false>status
|
| |
| const std::optional< std::string > & | name () const noexcept |
| | Constructs an empty property instance. false>name
|
| |
| const std::optional< std::string > & | semantic () const noexcept |
| | Constructs an empty property instance. false>semantic
|
| |
| const std::optional< std::string > & | description () const noexcept |
| | Constructs an empty property instance. false>description
|
| |
| int64_t | arrayCount () const noexcept |
| | Constructs an empty property instance. false>arrayCount
|
| |
| bool | normalized () const noexcept |
| | Constructs an empty property instance. false>normalized
|
| |
| std::optional< NormalizedType > | offset () const noexcept |
| | Constructs an empty property instance. false>offset
|
| |
| std::optional< NormalizedType > | scale () const noexcept |
| | Constructs an empty property instance. false>scale
|
| |
| std::optional< NormalizedType > | max () const noexcept |
| | Constructs an empty property instance. false>max
|
| |
| std::optional< NormalizedType > | min () const noexcept |
| | Constructs an empty property instance. false>min
|
| |
| bool | required () const noexcept |
| | Constructs an empty property instance. false>required
|
| |
| std::optional< ElementType > | noData () const noexcept |
| | Constructs an empty property instance. false>noData
|
| |
| std::optional< NormalizedType > | defaultValue () const noexcept |
| | Constructs an empty property instance. false>defaultValue
|
| |
| PropertyType | propertyType () const noexcept |
| | Returns the PropertyType of the property this view is accessing.
|
| |
template<typename ElementType>
class CesiumGltf::PropertyTablePropertyView< ElementType, true >
A view on the normalized data of the PropertyTableProperty that is created by a PropertyTableView.
It provides utility to retrieve the actual data stored in the PropertyTableProperty::values like an array of elements. Data of each instance can be accessed through the get method.
- Parameters
-
| ElementType | must be one of the following: an integer scalar (uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t), a glm vecN composed of one of the integer scalar types, a glm matN composed of one of the integer scalar types, or PropertyArrayView<T> with T as one of the aforementioned types. |
Definition at line 605 of file PropertyTablePropertyView.h.
template<typename ElementType>
Get the value of an element of the PropertyTable, with normalization and other value transforms applied. In other words, the value will be normalized, then transformed by the property's offset and scale, if they are defined.
If this property has a specified "no data" value, and the retrieved element is equal to that value, then this will return the property's specified default value. If the property did not provide a default value, this returns std::nullopt.
- Parameters
-
- Returns
- The value of the element, or std::nullopt if it matches the "no
data" value
Definition at line 737 of file PropertyTablePropertyView.h.