|
cesium-native 0.62.0
|
A view of the normalized data specified by a PropertyAttributeProperty.
More...
#include <CesiumGltf/PropertyAttributePropertyView.h>
Public Member Functions | |
| PropertyAttributePropertyView () noexcept | |
| Constructs an invalid instance for a non-existent property. | |
| PropertyAttributePropertyView (PropertyViewStatusType status) noexcept | |
| Constructs an invalid instance for an erroneous property. | |
| PropertyAttributePropertyView (const ClassProperty &classProperty, int64_t size) noexcept | |
| 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 get is called. However, getRaw cannot be used. | |
| PropertyAttributePropertyView (const PropertyAttributeProperty &property, const ClassProperty &classProperty, const AccessorView< ElementType > &accessorView) noexcept | |
Construct a view of the data specified by a PropertyAttributeProperty. | |
| std::optional< NormalizedType > | get (int64_t index) const noexcept |
| Gets the value of the property for the given vertex index with all value transforms applied. That is, if the property specifies an offset and scale, they will be applied to the value before the value is returned. | |
| ElementType | getRaw (int64_t index) const noexcept |
| Gets the raw value of the property for the given vertex index. | |
| int64_t | size () const noexcept |
| Get the number of elements in this PropertyAttributePropertyView. If the view is valid, this returns the count of the elements in the attribute's accessor. Otherwise, this returns 0. | |
| const AccessorView< ElementType > & | accessorView () const |
| Gets the underlying AccessorView from the PropertyAttributePropertyView. | |
Public Member Functions inherited from CesiumGltf::PropertyView< ElementType, true > | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from CesiumGltf::PropertyView< ElementType, true > | |
| PropertyView (PropertyViewStatusType status) | |
| Constructs an invalid instance for an erroneous property. | |
| PropertyView (const ClassProperty &classProperty, const PropertyTableProperty &property) | |
| Constructs a property instance from a property table property and its class definition. | |
| PropertyView (const ClassProperty &classProperty, const PropertyTextureProperty &property) | |
| Constructs a property instance from a property texture property and its class definition. | |
| PropertyView (const ClassProperty &classProperty, const PropertyAttributeProperty &property) | |
| Constructs a property instance from a property attribute property and its class definition. | |
Protected Attributes inherited from CesiumGltf::PropertyView< ElementType, true > | |
| PropertyViewStatusType | _status |
| Indicates the status of a property view. | |
A view of the normalized data specified by a PropertyAttributeProperty.
Ideally, property attribute properties can be initialized as vertex attributes in the target rendering context. However, some runtime engines do not allow custom vertex attributes. This view can be used instead to sample the property attributes property via vertex index.
| ElementType | The type of the elements represented in the property view |
Definition at line 277 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Constructs an invalid instance for a non-existent property.
Definition at line 286 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Constructs an invalid instance for an erroneous property.
| status | The code from PropertyAttributePropertyViewStatus indicating the error with the property. |
Definition at line 294 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
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 get is called. However, getRaw cannot be used.
| classProperty | The ClassProperty this property conforms to. |
| size | The number of elements in the primitive's POSITION accessor. Used as a substitute since no actual accessor is defined. |
Definition at line 310 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Construct a view of the data specified by a PropertyAttributeProperty.
| property | The PropertyAttributeProperty |
| classProperty | The ClassProperty this property conforms to. |
| accessorView | The AccessorView for the data that this property is associated with. |
Definition at line 342 of file PropertyAttributePropertyView.h.
|
inline |
Gets the underlying AccessorView from the PropertyAttributePropertyView.
Definition at line 444 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Gets the value of the property for the given vertex index with all value transforms applied. That is, if the property specifies an offset and scale, they will be applied to the value before the value is returned.
If this property has a specified "no data" value, this will return the property's default value for any elements that equal this "no data" value. If the property did not specify a default value, this returns std::nullopt.
| index | The vertex index. |
Definition at line 368 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Gets the raw value of the property for the given vertex index.
If this property has a specified "no data" value, the raw value will still be returned, even if it equals the "no data" value.
| index | The vertex index. |
Definition at line 418 of file PropertyAttributePropertyView.h.
|
inlinenoexcept |
Get the number of elements in this PropertyAttributePropertyView. If the view is valid, this returns the count of the elements in the attribute's accessor. Otherwise, this returns 0.
Definition at line 438 of file PropertyAttributePropertyView.h.