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

Inherits AZ::TickBus::Handler.

Inherited by GradientSignal::GradientPreviewWidget.

Public Types

using SampleFilterFunc = AZStd::function< float(float, const GradientSampleParams &)>
 

Public Member Functions

void SetGradientSampler (const GradientSampler &sampler)
 
void SetGradientSampleFilter (SampleFilterFunc filterFunc)
 
void OnTick ([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) override
 
void QueueUpdate ()
 
bool OnCancelRefresh ()
 

Protected Member Functions

virtual void OnUpdate ()=0
 
virtual QSize GetPreviewSize () const =0
 

Protected Attributes

GradientSampler m_sampler
 
SampleFilterFunc m_filterFunc
 
QImage m_previewImage
 
bool m_refreshUpdateJob = false
 
EditorGradientPreviewUpdateJobm_updateJob = nullptr
 

Member Function Documentation

◆ GetPreviewSize()

virtual QSize GradientSignal::EditorGradientPreviewRenderer::GetPreviewSize ( ) const
protectedpure virtual

Same as above, we need an abstract way to retrieve the size of the actual preview image from the QGraphicsItem

Implemented in GradientSignal::GradientPreviewWidget.

◆ OnUpdate()

virtual void GradientSignal::EditorGradientPreviewRenderer::OnUpdate ( )
protectedpure virtual

Since this base class is shared between a QWidget and a QGraphicsItem, we need to abstract the actual update() call so that they can invoke the proper one

Implemented in GradientSignal::GradientPreviewWidget.


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