Cesium for Unreal 2.15.0
Loading...
Searching...
No Matches
FCesiumMetadataEnumCollection Struct Reference

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< FCesiumMetadataEnumGet (const FString &InKey) const
 Obtains the FCesiumMetadataEnum corresponding to the given key.
 

Static Public Member Functions

static TSharedRef< FCesiumMetadataEnumCollectionGetOrCreateFromSchema (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< FCesiumMetadataEnumCollectionGetOrCreateFromModel (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.
 

Detailed Description

Contains a set of enum definitions obtained from a CesiumGltf::Schema.

Definition at line 66 of file CesiumMetadataEnum.h.

Constructor & Destructor Documentation

◆ FCesiumMetadataEnumCollection() [1/2]

FCesiumMetadataEnumCollection::FCesiumMetadataEnumCollection ( )
inline

Creates a new FCesiumMetadataEnumCollection without any enum definitions.

Definition at line 74 of file CesiumMetadataEnum.h.

◆ FCesiumMetadataEnumCollection() [2/2]

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.

Member Function Documentation

◆ Get()

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.

◆ GetOrCreateFromModel()

static TSharedPtr< FCesiumMetadataEnumCollection > FCesiumMetadataEnumCollection::GetOrCreateFromModel ( const CesiumGltf::Model & Model)
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.

Parameters
ModelThe model to lookup the schema from.

◆ GetOrCreateFromSchema()

static TSharedRef< FCesiumMetadataEnumCollection > FCesiumMetadataEnumCollection::GetOrCreateFromSchema ( CesiumGltf::Schema & Schema)
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.

Parameters
SchemaThe schema to create an enum collection from.

The documentation for this struct was generated from the following file: