|
cesium-native 0.62.0
|
Visitor that retrieves the texture coordinates from the given accessor type as a glm::dvec2. This should be initialized with the target index.
More...
#include <CesiumGltf/AccessorUtility.h>
Public Member Functions | |
| template<typename T> | |
| std::optional< glm::dvec2 > | operator() (const AccessorView< AccessorTypes::VEC2< T > > &value) |
Attempts to obtain a glm::dvec2 at the given index from an accessor over a vec2. The values will be cast to double and normalized based on std::numeric_limits<T>::max(). If the index is invalid, std::nullopt is returned instead. | |
Public Attributes | |
| int64_t | index |
| The index of texcoords to obtain. | |
Visitor that retrieves the texture coordinates from the given accessor type as a glm::dvec2. This should be initialized with the target index.
There are technically no invalid UV values because of clamp / wrap behavior, so std::nullopt is used to denote an erroneous value.
Definition at line 519 of file AccessorUtility.h.
|
inline |
Attempts to obtain a glm::dvec2 at the given index from an accessor over a vec2. The values will be cast to double and normalized based on std::numeric_limits<T>::max(). If the index is invalid, std::nullopt is returned instead.
Definition at line 528 of file AccessorUtility.h.
| int64_t CesiumGltf::TexCoordFromAccessor::index |
The index of texcoords to obtain.
Definition at line 543 of file AccessorUtility.h.