6#include "Kismet/BlueprintFunctionLibrary.h"
7#include "UObject/ObjectMacros.h"
8#include <CesiumGltf/AccessorUtility.h>
10#include "CesiumPrimitiveFeatures.generated.h"
13struct ExtensionExtMeshFeatures;
14struct ExtensionExtInstanceFeatures;
26 GENERATED_USTRUCT_BODY()
62 TArray<FCesiumFeatureIdSet> _featureIdSets;
66 int32_t _primitiveMode;
73 : public UBlueprintFunctionLibrary {
86 Category =
"Cesium|Primitive|Features")
99 Category =
"Cesium|Primitive|Features")
114 Category = "Cesium|Primitive|Features")
127 Category = "Cesium|Primitive|Features")
141 Category = "Cesium|Primitive|Features")
159 Category = "Cesium|Primitive|Features")
163 int64 FeatureIDSetIndex = 0);
171 Category = "Cesium|Primitive|Features")
175 int64 FeatureIDSetIndex = 0);
191 Category = "Cesium|Primitive|Features")
194 const FHitResult& Hit,
195 int64 FeatureIDSetIndex = 0);
ECesiumFeatureIdSetType
The type of a feature ID set.
static int64 GetFeatureIDFromFace(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures, int64 FaceIndex, int64 FeatureIDSetIndex=0)
Gets the feature ID associated with the given face.
static const FCesiumPrimitiveFeatures & GetPrimitiveFeatures(const UPrimitiveComponent *component)
Gets the primitive features of a glTF primitive component.
static int64 GetVertexCount(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures)
Get the number of vertices in the primitive.
static const TArray< FCesiumFeatureIdSet > & GetFeatureIDSets(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures)
Gets all the feature ID sets that are associated with the primitive.
static int64 GetFeatureIDFromInstance(UPARAM(ref) const FCesiumPrimitiveFeatures &InstanceFeatures, int64 InstanceIndex, int64 FeatureIDSetIndex=0)
Gets the feature ID associated with the instance at the given index.
static const TArray< FCesiumFeatureIdSet > GetFeatureIDSetsOfType(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures, ECesiumFeatureIdSetType Type)
Gets all the feature ID sets of the given type.
static int64 GetFirstVertexFromFace(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures, int64 FaceIndex)
Gets the index of the first vertex that makes up a given face of this primitive.
static int64 GetFeatureIDFromHit(UPARAM(ref) const FCesiumPrimitiveFeatures &PrimitiveFeatures, const FHitResult &Hit, int64 FeatureIDSetIndex=0)
Gets the feature ID from the given line trace hit, assuming it has hit a glTF primitive component con...
std::variant< std::monostate, AccessorView< uint8_t >, AccessorView< uint16_t >, AccessorView< uint32_t > > IndexAccessorType
A blueprint-accessible wrapper for a feature ID set from a glTF primitive.
A Blueprint-accessible wrapper for a glTF Primitive's mesh features.
FCesiumPrimitiveFeatures(const CesiumGltf::Model &Model, const CesiumGltf::MeshPrimitive &Primitive, const CesiumGltf::ExtensionExtMeshFeatures &Features)
Constructs a primitive features instance.
FCesiumPrimitiveFeatures()
Constructs an empty primitive features instance.
FCesiumPrimitiveFeatures(const CesiumGltf::Model &Model, const CesiumGltf::Node &Node, const CesiumGltf::ExtensionExtInstanceFeatures &InstanceFeatures)
Constructs an instance feature object.