Open 3D Engine GradientSignal 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.
GradientSignal::GradientRequests Class Referenceabstract

#include <GradientRequestBus.h>

Inherits AZ::EBusSharedDispatchTraits< GradientRequests >.

Public Types

using BusIdType = AZ::EntityId
 

Public Member Functions

virtual float GetValue (const GradientSampleParams &sampleParams) const =0
 
virtual void GetValues (AZStd::span< const AZ::Vector3 > positions, AZStd::span< float > outValues) const
 
virtual bool IsEntityInHierarchy (const AZ::EntityId &entityId) const
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

Handles gradient sampling requests based on up to 3 data points such as X,Y,Z. This bus uses shared dispatches, which means that all requests on the bus can run in parallel, but will NOT run in parallel with bus connections / disconnections.

Member Function Documentation

◆ GetValue()

virtual float GradientSignal::GradientRequests::GetValue ( const GradientSampleParams sampleParams) const
pure virtual

Given a certain position, generate a value. Implementations of this need to be thread-safe without using locks, as it can get called from both the Main thread and the Vegetation thread simultaneously, and has the potential to cause lock inversion deadlocks.

Returns
a value generated using the position

◆ GetValues()

virtual void GradientSignal::GradientRequests::GetValues ( AZStd::span< const AZ::Vector3 >  positions,
AZStd::span< float >  outValues 
) const
inlinevirtual

Given a list of positions, generate values. Implementations of this need to be thread-safe without using locks, as it can get called from multiple threads simultaneously and has the potential to cause lock inversion deadlocks.

Parameters
positionsThe input list of positions to query.
outValuesThe output list of values. This list is expected to be the same size as the positions list.

◆ IsEntityInHierarchy()

virtual bool GradientSignal::GradientRequests::IsEntityInHierarchy ( const AZ::EntityId &  entityId) const
inlinevirtual

Call to check the hierarchy to see if a given entityId exists in the gradient signal chain


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