5#include "Containers/UnrealString.h"
6#include "Kismet/BlueprintFunctionLibrary.h"
8#include <CesiumGltf/AccessorUtility.h>
9#include <CesiumGltf/FeatureIdTextureView.h>
11#include "CesiumFeatureIdTexture.generated.h"
15struct FeatureIdTexture;
41 GENERATED_USTRUCT_BODY()
66 const FString& PropertyTableName);
73 return this->_featureIdTextureView;
80 int64 _textureCoordinateSetIndex;
83 FString _propertyTableName;
90 : public UBlueprintFunctionLibrary {
94 PRAGMA_DISABLE_DEPRECATION_WARNINGS
103 Category =
"Cesium|Metadata|FeatureIdTexture",
107 "Use GetPropertyTableIndex on a CesiumFeatureIdSet instead."))
108 static const FString&
111 PRAGMA_ENABLE_DEPRECATION_WARNINGS
120 Category =
"Cesium|Features|FeatureIDTexture")
138 Category = "Cesium|Features|FeatureIDTexture")
161 Category = "Cesium|Features|FeatureIDTexture")
163 const UPrimitiveComponent* Component,
166 PRAGMA_DISABLE_DEPRECATION_WARNINGS
179 Category = "Cesium|Features|FeatureIDTexture")
184 PRAGMA_ENABLE_DEPRECATION_WARNINGS
196 Category = "Cesium|Features|FeatureIDTexture")
199 const FVector2D& UV);
214 Category = "Cesium|Features|FeatureIDTexture")
229 Category = "Cesium|Features|FeatureIDTexture")
232 const FHitResult& Hit);
ECesiumFeatureIdTextureStatus
Reports the status of a FCesiumFeatureIdTexture.
@ ErrorInvalidTextureAccess
static PRAGMA_ENABLE_DEPRECATION_WARNINGS int64 GetFeatureIDForUV(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture, const FVector2D &UV)
Gets the feature ID corresponding to the pixel specified by the UV texture coordinates.
static int64 GetGltfTextureCoordinateSetIndex(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture)
Gets the glTF texture coordinate set index used by the feature ID texture.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS const FString & GetFeatureTableName(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture)
Gets the name of the feature table corresponding to this feature ID texture.
static int64 GetUnrealUVChannel(const UPrimitiveComponent *Component, UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture)
Gets the UV channel containing the texture coordinate set that is used by the feature ID texture on t...
static PRAGMA_DISABLE_DEPRECATION_WARNINGS int64 GetFeatureIDForTextureCoordinates(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture, float U, float V)
Gets the feature ID corresponding to the pixel specified by the texture coordinates.
static int64 GetFeatureIDFromHit(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture, const FHitResult &Hit)
Gets the feature ID from a given line trace hit on the primitive containing this feature ID texture.
static int64 GetFeatureIDForVertex(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture, int64 VertexIndex)
Gets the feature ID associated with the given vertex.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS ECesiumFeatureIdTextureStatus GetFeatureIDTextureStatus(UPARAM(ref) const FCesiumFeatureIdTexture &FeatureIDTexture)
Gets the status of the feature ID texture.
std::variant< AccessorView< AccessorTypes::VEC2< uint8_t > >, AccessorView< AccessorTypes::VEC2< uint16_t > >, AccessorView< AccessorTypes::VEC2< float > > > TexCoordAccessorType
A blueprint-accessible wrapper for a feature ID texture from a glTF primitive.
constexpr const CesiumGltf::FeatureIdTextureView & getFeatureIdTextureView() const
Gets the underlying view of this feature ID texture.
FCesiumFeatureIdTexture(const CesiumGltf::Model &Model, const CesiumGltf::MeshPrimitive &Primitive, const CesiumGltf::FeatureIdTexture &FeatureIdTexture, const FString &PropertyTableName)
Constructs a feature ID texture instance.
FCesiumFeatureIdTexture()
Constructs an empty feature ID texture instance.