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

#include <PaintBrushSessionBus.h>

Inherits AZ::EBusTraits.

Public Member Functions

virtual AZ::Uuid StartPaintSession (const AZ::EntityId &paintableEntityId)=0
 
virtual void EndPaintSession (const AZ::Uuid &sessionId)=0
 
virtual void BeginBrushStroke (const AZ::Uuid &sessionId, const AzFramework::PaintBrushSettings &brushSettings)=0
 
virtual void EndBrushStroke (const AZ::Uuid &sessionId)=0
 End the current brush stroke.
 
virtual bool IsInBrushStroke (const AZ::Uuid &sessionId) const =0
 
virtual void ResetBrushStrokeTracking (const AZ::Uuid &sessionId)=0
 
virtual void PaintToLocation (const AZ::Uuid &sessionId, const AZ::Vector3 &brushCenter, const AzFramework::PaintBrushSettings &brushSettings)=0
 
virtual void SmoothToLocation (const AZ::Uuid &sessionId, const AZ::Vector3 &brushCenter, const AzFramework::PaintBrushSettings &brushSettings)=0
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

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

Detailed Description

EBus that supports the painting API at runtime. This is exposed to the Behavior Context and provides a common runtime interface for any paintable component.

Member Function Documentation

◆ BeginBrushStroke()

virtual void AzFramework::PaintBrushSession::BeginBrushStroke ( const AZ::Uuid &  sessionId,
const AzFramework::PaintBrushSettings brushSettings 
)
pure virtual

The following APIs are the high-level image modification APIs. These enable image modifications through paintbrush controls. Start a brush stroke with the given brush settings for color/intensity/opacity.

Parameters
brushSettingsThe paintbrush settings containing the color/intensity/opacity to use for the brush stroke.

◆ EndPaintSession()

virtual void AzFramework::PaintBrushSession::EndPaintSession ( const AZ::Uuid &  sessionId)
pure virtual

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

◆ IsInBrushStroke()

virtual bool AzFramework::PaintBrushSession::IsInBrushStroke ( const AZ::Uuid &  sessionId) const
pure virtual

Returns whether or not the brush is currently in a brush stroke.

Returns
True if a brush stroke has been started, false if not.

◆ PaintToLocation()

virtual void AzFramework::PaintBrushSession::PaintToLocation ( const AZ::Uuid &  sessionId,
const AZ::Vector3 &  brushCenter,
const AzFramework::PaintBrushSettings brushSettings 
)
pure virtual

Apply a paint color to the underlying data based on brush movement and settings.

Parameters
brushCenterThe current center of the paintbrush.
brushSettingsThe current paintbrush settings.

◆ ResetBrushStrokeTracking()

virtual void AzFramework::PaintBrushSession::ResetBrushStrokeTracking ( const AZ::Uuid &  sessionId)
pure virtual

Reset the brush tracking so that the next action will be considered the start of a stroke movement instead of a continuation. This is useful for handling discontinuous movement (like moving off the edge of the surface on one side and back on from a different side).

◆ SmoothToLocation()

virtual void AzFramework::PaintBrushSession::SmoothToLocation ( const AZ::Uuid &  sessionId,
const AZ::Vector3 &  brushCenter,
const AzFramework::PaintBrushSettings brushSettings 
)
pure virtual

Smooth the underlying data based on brush movement and settings.

Parameters
brushCenterThe current center of the paintbrush.
brushSettingsThe current paintbrush settings.

◆ StartPaintSession()

virtual AZ::Uuid AzFramework::PaintBrushSession::StartPaintSession ( const AZ::EntityId &  paintableEntityId)
pure virtual

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

Parameters
paintableEntityIdThe entity to connect with a paintbrush session.

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