Open 3D Engine Terrain Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Terrain::TerrainMacroMaterialNotifications Class Reference

#include <TerrainMacroMaterialBus.h>

Inherits AZ::EBusTraits.

Public Member Functions

virtual void OnTerrainMacroMaterialCreated ([[maybe_unused]] AZ::EntityId macroMaterialEntity, [[maybe_unused]] const MacroMaterialData &macroMaterial)
 
virtual void OnTerrainMacroMaterialChanged ([[maybe_unused]] AZ::EntityId macroMaterialEntity, [[maybe_unused]] const MacroMaterialData &macroMaterial)
 
virtual void OnTerrainMacroMaterialRegionChanged ([[maybe_unused]] AZ::EntityId macroMaterialEntity, [[maybe_unused]] const AZ::Aabb &oldRegion, [[maybe_unused]] const AZ::Aabb &newRegion)
 
virtual void OnTerrainMacroMaterialDestroyed ([[maybe_unused]] AZ::EntityId macroMaterialEntity)
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple
 Allow multiple listeners to the notification bus.
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 

Detailed Description

Notifications for when the terrain macro material data changes.

Member Function Documentation

◆ OnTerrainMacroMaterialChanged()

virtual void Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialChanged ( [[maybe_unused] ] AZ::EntityId  macroMaterialEntity,
[[maybe_unused] ] const MacroMaterialData macroMaterial 
)
inlinevirtual

Notify any listeners that the macro material data changed.

Parameters
macroMaterialEntityThe Entity ID for the entity containing the macro material.
macroMaterialThe data for the changed macro material. (This data contains the new changes)

◆ OnTerrainMacroMaterialCreated()

virtual void Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialCreated ( [[maybe_unused] ] AZ::EntityId  macroMaterialEntity,
[[maybe_unused] ] const MacroMaterialData macroMaterial 
)
inlinevirtual

Notify any listeners that a new macro material has been created.

Parameters
macroMaterialEntityThe Entity ID for the entity containing the macro material.
macroMaterialThe data for the newly-created macro material.

◆ OnTerrainMacroMaterialDestroyed()

virtual void Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialDestroyed ( [[maybe_unused] ] AZ::EntityId  macroMaterialEntity)
inlinevirtual

Notify any listeners that the macro material has been destroyed.

Parameters
macroMaterialEntityThe Entity ID for the entity containing the macro material.

◆ OnTerrainMacroMaterialRegionChanged()

virtual void Terrain::TerrainMacroMaterialNotifications::OnTerrainMacroMaterialRegionChanged ( [[maybe_unused] ] AZ::EntityId  macroMaterialEntity,
[[maybe_unused] ] const AZ::Aabb &  oldRegion,
[[maybe_unused] ] const AZ::Aabb &  newRegion 
)
inlinevirtual

Notify any listeners that the region affected by the macro material has changed (presumably by moving the transform or the box)

Parameters
macroMaterialEntityThe Entity ID for the entity containing the macro material.
oldRegionThe previous region covered by the macro material.
newRegionThe new region covered by the macro material.

Member Data Documentation

◆ AddressPolicy

const AZ::EBusAddressPolicy Terrain::TerrainMacroMaterialNotifications::AddressPolicy = AZ::EBusAddressPolicy::Single
static

Notifications are broadcast to everyone and don't require subscribing to a specific ID or address. This is because the systems that care about this information wouldn't know which entity IDs to listen to until after it received a "macro material created" event, which is one of the events sent out on this bus. So instead, all the events include which entity ID they affect, but don't require subscribing to specific entity IDs.


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