cesium-native 0.48.0
Loading...
Searching...
No Matches
FeatureIdTextureView.h
1#pragma once
2
3#include <CesiumGltf/FeatureIdTexture.h>
4#include <CesiumGltf/TextureView.h>
5
6#include <cstdint>
7
8namespace CesiumGltf {
9
10struct Model;
11
67
75public:
80
103 const Model& model,
104 const FeatureIdTexture& featureIdTexture,
105 const TextureViewOptions& options = TextureViewOptions()) noexcept;
106
117 int64_t getFeatureID(double u, double v) const noexcept;
118
124 FeatureIdTextureViewStatus status() const noexcept { return this->_status; }
125
130 std::vector<int64_t> getChannels() const noexcept { return this->_channels; }
131
132private:
134 std::vector<int64_t> _channels;
135};
136} // namespace CesiumGltf
FeatureIdTextureViewStatus status() const noexcept
Get the status of this view.
FeatureIdTextureView() noexcept
Constructs an uninitialized and invalid view.
std::vector< int64_t > getChannels() const noexcept
Get the channels of this feature ID texture. The channels represent the bytes of the actual feature I...
int64_t getFeatureID(double u, double v) const noexcept
Get the feature ID from the texture at the given texture coordinates. If the texture is somehow inval...
TextureView() noexcept
Constructs an empty, uninitialized texture view.
Classes for working with glTF models.
FeatureIdTextureViewStatus
The status of a feature ID texture view.
@ ErrorInvalidImageBytesPerChannel
The image for this feature ID texture has channels that take up more than a byte. Only single-byte ch...
@ ErrorEmptyImage
This feature ID texture has an empty image.
@ ErrorUninitialized
This view has not yet been initialized.
@ ErrorInvalidChannels
The channels of this feature ID texture property are invalid. Channels must be in the range 0-3,...
@ ErrorInvalidSampler
This feature ID texture has a sampler index that doesn't exist in the glTF.
@ ErrorInvalidImage
This feature ID texture has an image index that doesn't exist in the glTF.
@ ErrorInvalidTexture
This feature ID texture has a texture index that doesn't exist in the glTF.
@ Valid
This accessor is valid and ready to use.
A texture containing feature IDs.
This class is not meant to be instantiated directly. Use Model instead.
Definition Model.h:14
Describes options for constructing a view on a glTF texture.
Definition TextureView.h:18