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

Inherits AZ::Component, TerrainMacroMaterialRequestBus::Handler, TerrainMacroColorModificationBus::Handler, AzFramework::PaintBrushNotificationBus::Handler, LmbrCentral::ShapeComponentNotificationsBus::Handler, and AZ::Data::AssetBus::MultiHandler.

Public Member Functions

 AZ_COMPONENT (TerrainMacroMaterialComponent, "{F82379FB-E2AE-4F75-A6F4-1AE5F5DA42E8}")
 
 TerrainMacroMaterialComponent (const TerrainMacroMaterialConfig &configuration)
 
void Activate () override
 
void Deactivate () override
 
bool ReadInConfig (const AZ::ComponentConfig *baseConfig) override
 
bool WriteOutConfig (AZ::ComponentConfig *outBaseConfig) const override
 
MacroMaterialData GetTerrainMacroMaterialData () override
 
AZ::RHI::Size GetMacroColorImageSize () const override
 
AZ::Vector2 GetMacroColorImagePixelsPerMeter () const override
 
void StartMacroColorImageModification () override
 
void EndMacroColorImageModification () override
 
void GetMacroColorPixelValuesByPosition (AZStd::span< const AZ::Vector3 > positions, AZStd::span< AZ::Color > outValues) const override
 
void GetMacroColorPixelIndicesForPositions (AZStd::span< const AZ::Vector3 > positions, AZStd::span< PixelIndex > outIndices) const override
 
void GetMacroColorPixelValuesByPixelIndex (AZStd::span< const PixelIndex > positions, AZStd::span< AZ::Color > outValues) const override
 
void StartMacroColorPixelModifications () override
 
void EndMacroColorPixelModifications () override
 
void SetMacroColorPixelValuesByPixelIndex (AZStd::span< const PixelIndex > positions, AZStd::span< const AZ::Color > values) override
 
bool MacroColorImageIsModified () const
 

Static Public Member Functions

static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &services)
 
static void Reflect (AZ::ReflectContext *context)
 

Protected Member Functions

void NotifyTerrainSystemOfColorChange (const AZ::Aabb &bounds)
 
AZ::Data::Asset< AZ::RPI::StreamingImageAsset > GetMacroColorAsset () const
 
void SetMacroColorAsset (const AZ::Data::Asset< AZ::RPI::StreamingImageAsset > &asset)
 
AZStd::span< const uint32_t > GetMacroColorImageModificationBuffer () const
 
void OnPaintModeBegin () override
 
void OnPaintModeEnd () override
 
AZ::Color OnGetColor (const AZ::Vector3 &brushCenter) const override
 
uint32_t GetHighestLoadedMipLevel () const
 
void CreateMacroColorImageModificationBuffer ()
 
void DestroyMacroColorImageModificationBuffer ()
 
bool MacroColorModificationBufferIsActive () const
 
void UpdateMacroMaterialTexture (PixelIndex leftTopPixel, PixelIndex rightBottomPixel)
 

Static Protected Attributes

static constexpr uint32_t InvalidMipLevel = AZStd::numeric_limits<uint32_t>::max()
 

Friends

class EditorTerrainMacroMaterialComponent
 

Member Function Documentation

◆ GetMacroColorImageModificationBuffer()

AZStd::span< const uint32_t > Terrain::TerrainMacroMaterialComponent::GetMacroColorImageModificationBuffer ( ) const
protected

Get the macro color modification buffer. This is only exposed so that the editor component has the ability to save the buffer as an asset.


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