![]() |
Cesium for Unreal 2.15.0
|
Contains a set of enum definitions obtained from a CesiumGltf::Schema. More...
#include <CesiumMetadataEnum.h>
Public Member Functions | |
FCesiumMetadataEnumCollection () | |
Creates a new FCesiumMetadataEnumCollection without any enum definitions. | |
FCesiumMetadataEnumCollection (const CesiumGltf::Schema &Schema) | |
Creates a new FCesiumMetadataEnumCollection with definitions obtained from the enums property of the given CesiumGltf::Schema. | |
TSharedPtr< FCesiumMetadataEnum > | Get (const FString &InKey) const |
Obtains the FCesiumMetadataEnum corresponding to the given key. | |
Static Public Member Functions | |
static TSharedRef< FCesiumMetadataEnumCollection > | GetOrCreateFromSchema (CesiumGltf::Schema &Schema) |
Attempts to obtain a FCesiumMetadataEnumCollection from the given schema if one has already been created, or creates one if not. | |
static TSharedPtr< FCesiumMetadataEnumCollection > | GetOrCreateFromModel (const CesiumGltf::Model &Model) |
Attempts to obtain a FCesiumMetadataEnumCollection from a schema attached to the given model, or returns an invalid TSharedPtr if no schema is present. | |
Contains a set of enum definitions obtained from a CesiumGltf::Schema.
Definition at line 66 of file CesiumMetadataEnum.h.
|
inline |
Creates a new FCesiumMetadataEnumCollection without any enum definitions.
Definition at line 74 of file CesiumMetadataEnum.h.
FCesiumMetadataEnumCollection::FCesiumMetadataEnumCollection | ( | const CesiumGltf::Schema & | Schema | ) |
Creates a new FCesiumMetadataEnumCollection with definitions obtained from the enums
property of the given CesiumGltf::Schema.
In most cases, FCesiumMetadataEnumCollection::GetOrCreateFromSchema should be used instead.
TSharedPtr< FCesiumMetadataEnum > FCesiumMetadataEnumCollection::Get | ( | const FString & | InKey | ) | const |
Obtains the FCesiumMetadataEnum corresponding to the given key.
The input key should be one of the keys in the enums
of the CesiumGltf::Schema that this collection is based on.
|
static |
Attempts to obtain a FCesiumMetadataEnumCollection from a schema attached to the given model, or returns an invalid TSharedPtr
if no schema is present.
This method is equivalent to looking up the schema from the model yourself and calling FCesiumMetadataEnumCollection::GetOrCreateFromSchema.
Model | The model to lookup the schema from. |
|
static |
Attempts to obtain a FCesiumMetadataEnumCollection from the given schema if one has already been created, or creates one if not.
This method utilizes a custom extension on the CesiumGltf::Schema to prevent duplicate enum collections from being created for the same schema, avoiding unnecessary allocations.
Schema | The schema to create an enum collection from. |