![]() |
Cesium for Unreal 2.21.0
|
An interface that receives events about the lifecycle of tiles in a Cesium3DTileset. More...
#include <Cesium3DTilesetLifecycleEventReceiver.h>
Public Member Functions | |
| virtual UMaterialInstanceDynamic * | CreateMaterial (ICesiumLoadedTilePrimitive &TilePrimitive, UMaterialInterface *DefaultBaseMaterial, const FName &Name) |
| Creates a material instance for a given tile primitive. | |
| virtual void | CustomizeMaterial (ICesiumLoadedTilePrimitive &TilePrimitive, UMaterialInstanceDynamic &Material, const UCesiumMaterialUserData *CesiumData, const CesiumGltf::Material &GltfMaterial) |
| Allows customization of the Unreal material instance used to render a tile's primitive. | |
| virtual void | OnTileMeshPrimitiveLoaded (ICesiumLoadedTilePrimitive &TilePrimitive) |
Called after a MeshPrimitive in a tile's glTF is loaded. | |
| virtual void | OnTileLoaded (ICesiumLoadedTile &Tile) |
| Called after a new tile has been loaded. | |
| virtual void | OnTileVisibilityChanged (ICesiumLoadedTile &Tile, bool bVisible) |
| Called when a tile is shown or hidden. | |
| virtual void | OnTileUnloading (ICesiumLoadedTile &Tile) |
| Called before a tile is unloaded. | |
An interface that receives events about the lifecycle of tiles in a Cesium3DTileset.
Implement this interface and provide your implementation to the tileset by calling SetLifecycleEventReceiver to receive callbacks when tiles are loaded, unloaded, hidden, or shown. This interface can also customize the Unreal material that is used to render each primitive in each tile.
All methods are called from the game thread.
Definition at line 46 of file Cesium3DTilesetLifecycleEventReceiver.h.
|
virtual |
Creates a material instance for a given tile primitive.
The default implementation simply calls UMaterialInstanceDynamic::Create with the default base material. Overriding this method is useful when a different base material should be selected based on properties of the primitive.
| TilePrimitive | Loaded tile primitive for which a material is needed. |
| DefaultBaseMaterial | Default chosen base material. May be ignored if the method chooses to create the mesh material based on a custom base material. |
| Name | The name for the new material, as used by creation functions like NewObject. |
nullptr.
|
virtual |
Allows customization of the Unreal material instance used to render a tile's primitive.
This is especially useful for modifying the material based on application-specific extensions to the glTF material definition.
This method is called on the Material created by CreateMaterial after all of the standard parameters have been set on it.
| TilePrimitive | Loaded tile primitive to which the material applies. |
| Material | The Unreal material created for the primitive. |
| CesiumData | The list of the material's layer names. This can be used to map Unreal material layers to specific behavior. |
| GltfMaterial | The glTF material definition. |
|
virtual |
Called after a new tile has been loaded.
This method is called after OnTileMeshPrimitiveLoaded has been called for all of the tile's primitives.
| Tile | The tile that has just been loaded |
|
virtual |
Called after a MeshPrimitive in a tile's glTF is loaded.
This method is called at the end of the load process, after construction of the static mesh component that will render the primitive.
| TilePrimitive | Tile primitive that has just been loaded. |
|
virtual |
Called before a tile is unloaded.
| Tile | The tile that is about to be unloaded. |
|
virtual |
Called when a tile is shown or hidden.
This may be called zero or more times per tile.
| Tile | The tile for which visibility is being toggled. |
| bVisible | New visibility flag being applied. |