Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumPrimitiveMetadata.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Kismet/BlueprintFunctionLibrary.h"
6#include "UObject/ObjectMacros.h"
7
8#include "CesiumPrimitiveMetadata.generated.h"
9
10namespace CesiumGltf {
11struct Model;
12struct MeshPrimitive;
13struct ExtensionModelExtStructuralMetadata;
14struct ExtensionMeshPrimitiveExtStructuralMetadata;
15} // namespace CesiumGltf
16
23USTRUCT(BlueprintType)
24struct CESIUMRUNTIME_API FCesiumPrimitiveMetadata {
25 GENERATED_USTRUCT_BODY()
26
27public:
32
41 const CesiumGltf::MeshPrimitive& Primitive,
43
44private:
45 TArray<int64> _propertyTextureIndices;
46 TArray<int64> _propertyAttributeIndices;
47
49};
50
51UCLASS()
53 : public UBlueprintFunctionLibrary {
54 GENERATED_BODY()
55
56public:
61 UFUNCTION(
62 BlueprintCallable,
63 BlueprintPure,
64 Category = "Cesium|Primitive|Metadata")
65 static const FCesiumPrimitiveMetadata&
66 GetPrimitiveMetadata(const UPrimitiveComponent* component);
67
73 UFUNCTION(
74 BlueprintCallable,
75 BlueprintPure,
76 Category = "Cesium|Primitive|Metadata")
77 static const TArray<int64>& GetPropertyTextureIndices(
78 UPARAM(ref) const FCesiumPrimitiveMetadata& PrimitiveMetadata);
79
85 UFUNCTION(
86 BlueprintCallable,
87 BlueprintPure,
88 Category = "Cesium|Primitive|Metadata")
89 static const TArray<int64>& GetPropertyAttributeIndices(
90 UPARAM(ref) const FCesiumPrimitiveMetadata& PrimitiveMetadata);
91};
static const FCesiumPrimitiveMetadata & GetPrimitiveMetadata(const UPrimitiveComponent *component)
Gets the primitive metadata of a glTF primitive component.
static const TArray< int64 > & GetPropertyAttributeIndices(UPARAM(ref) const FCesiumPrimitiveMetadata &PrimitiveMetadata)
Get the indices of the property attributes that are associated with the primitive.
static const TArray< int64 > & GetPropertyTextureIndices(UPARAM(ref) const FCesiumPrimitiveMetadata &PrimitiveMetadata)
Get the indices of the property textures that are associated with the primitive.
A Blueprint-accessible wrapper for a glTF Primitive's EXT_structural_metadata extension.
FCesiumPrimitiveMetadata(const CesiumGltf::MeshPrimitive &Primitive, const CesiumGltf::ExtensionMeshPrimitiveExtStructuralMetadata &Metadata)
Constructs a primitive metadata instance.
FCesiumPrimitiveMetadata()
Construct an empty primitive metadata.