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::TerrainMacroColorModifications Class Referenceabstract

#include <TerrainMacroMaterialBus.h>

Inherits AZ::ComponentBus.

Public Member Functions

virtual void StartMacroColorImageModification ()=0
 
virtual void EndMacroColorImageModification ()=0
 
virtual void GetMacroColorPixelIndicesForPositions (AZStd::span< const AZ::Vector3 > positions, AZStd::span< PixelIndex > outIndices) const =0
 
virtual void GetMacroColorPixelValuesByPosition (AZStd::span< const AZ::Vector3 > positions, AZStd::span< AZ::Color > outValues) const =0
 
virtual void GetMacroColorPixelValuesByPixelIndex (AZStd::span< const PixelIndex > indices, AZStd::span< AZ::Color > outValues) const =0
 
virtual void StartMacroColorPixelModifications ()=0
 
virtual void EndMacroColorPixelModifications ()=0
 
virtual void SetMacroColorPixelValuesByPixelIndex (AZStd::span< const PixelIndex > indices, AZStd::span< const AZ::Color > values)=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 

Detailed Description

EBus that can be used to modify the image data for a Terrain Macro Color texture. The following APIs are the low-level image modification APIs that enable image modifications at the per-pixel level.

Member Function Documentation

◆ EndMacroColorImageModification()

virtual void Terrain::TerrainMacroColorModifications::EndMacroColorImageModification ( )
pure virtual

Finish an image modification session. Clean up any helper structures used during image modification.

◆ EndMacroColorPixelModifications()

virtual void Terrain::TerrainMacroColorModifications::EndMacroColorPixelModifications ( )
pure virtual

End a series of pixel modifications. This will notify that the series of pixel modifications have ended, so buffer refreshes can now happen.

◆ GetMacroColorPixelIndicesForPositions()

virtual void Terrain::TerrainMacroColorModifications::GetMacroColorPixelIndicesForPositions ( AZStd::span< const AZ::Vector3 >  positions,
AZStd::span< PixelIndex >  outIndices 
) const
pure virtual

Given a list of world positions, return a list of pixel indices into the image.

Parameters
positionsThe list of world positions to query
outIndices[out] The list of output PixelIndex values giving the (x,y) pixel coordinates for each world position.

◆ GetMacroColorPixelValuesByPixelIndex()

virtual void Terrain::TerrainMacroColorModifications::GetMacroColorPixelValuesByPixelIndex ( AZStd::span< const PixelIndex >  indices,
AZStd::span< AZ::Color >  outValues 
) const
pure virtual

Get the image pixel values at a list of pixel indices.

Parameters
positionsThe list of pixel indices to query
outValues[out] The list of output values. This list is expected to be the same size as the positions list.

◆ GetMacroColorPixelValuesByPosition()

virtual void Terrain::TerrainMacroColorModifications::GetMacroColorPixelValuesByPosition ( AZStd::span< const AZ::Vector3 >  positions,
AZStd::span< AZ::Color >  outValues 
) const
pure virtual

Get the image pixel values at a list of positions.

Parameters
positionsThe list of world positions to query
outValues[out] The list of output values. This list is expected to be the same size as the positions list.

◆ SetMacroColorPixelValuesByPixelIndex()

virtual void Terrain::TerrainMacroColorModifications::SetMacroColorPixelValuesByPixelIndex ( AZStd::span< const PixelIndex >  indices,
AZStd::span< const AZ::Color >  values 
)
pure virtual

Given a list of pixel indices, set those pixels to the given values.

Parameters
indicdesThe list of pixel indices to set the values for.
valuesThe list of values to set. This list is expected to be the same size as the positions list.

◆ StartMacroColorImageModification()

virtual void Terrain::TerrainMacroColorModifications::StartMacroColorImageModification ( )
pure virtual

Start an image modification session. This will create a modification buffer that contains an uncompressed copy of the current macro color image data.

◆ StartMacroColorPixelModifications()

virtual void Terrain::TerrainMacroColorModifications::StartMacroColorPixelModifications ( )
pure virtual

Start a series of pixel modifications. This will track all of the pixels modified so that they can be updated once at the end.


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