#include <ImageGradientModificationBus.h>
Inherits AZ::ComponentBus.
|
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
EBus that can be used to modify the image data for an Image Gradient. The following APIs are the low-level image modification APIs that enable image modifications at the per-pixel level.
◆ EndImageModification()
virtual void GradientSignal::ImageGradientModifications::EndImageModification |
( |
| ) |
|
|
pure virtual |
Finish an image modification session. Clean up any helper structures used during image modification.
◆ GetPixelIndicesForPositions()
virtual void GradientSignal::ImageGradientModifications::GetPixelIndicesForPositions |
( |
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
-
positions | The list of world positions to query |
outIndices | [out] The list of output PixelIndex values giving the (x,y) pixel coordinates for each world position. |
◆ GetPixelValuesByPixelIndex()
virtual void GradientSignal::ImageGradientModifications::GetPixelValuesByPixelIndex |
( |
AZStd::span< const PixelIndex > |
indices, |
|
|
AZStd::span< float > |
outValues |
|
) |
| const |
|
pure virtual |
Get the image pixel values at a list of pixel indices. This provides different results than GradientRequestBus::GetValues because it's returning raw pixel values.
- This will always use point sampling instead of the Image Gradient sampler type
- This will always return back an unscaled value, instead of using the Image Gradient scale mode and range
- Parameters
-
positions | The 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. |
◆ GetPixelValuesByPosition()
virtual void GradientSignal::ImageGradientModifications::GetPixelValuesByPosition |
( |
AZStd::span< const AZ::Vector3 > |
positions, |
|
|
AZStd::span< float > |
outValues |
|
) |
| const |
|
pure virtual |
Get the image pixel values at a list of positions. This provides different results than GradientRequestBus::GetValues because it's returning raw pixel values.
- This will always use point sampling instead of the Image Gradient sampler type
- This will always return back an unscaled value, instead of using the Image Gradient scale mode and range
- Parameters
-
positions | The 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. |
◆ SetPixelValuesByPixelIndex()
virtual void GradientSignal::ImageGradientModifications::SetPixelValuesByPixelIndex |
( |
AZStd::span< const PixelIndex > |
indices, |
|
|
AZStd::span< const float > |
values |
|
) |
| |
|
pure virtual |
Given a list of pixel indices, set those pixels to the given values.
- Parameters
-
indicdes | The list of pixel indices to set the values for. |
values | The list of values to set. This list is expected to be the same size as the positions list. |
◆ SetPixelValuesByPosition()
virtual void GradientSignal::ImageGradientModifications::SetPixelValuesByPosition |
( |
AZStd::span< const AZ::Vector3 > |
positions, |
|
|
AZStd::span< const float > |
values |
|
) |
| |
|
pure virtual |
Given a list of world positions, set the pixels at those positions to the given values.
- Parameters
-
positions | The list of world positions to set the values for. |
values | The list of values to set. This list is expected to be the same size as the positions list. |
◆ StartImageModification()
virtual void GradientSignal::ImageGradientModifications::StartImageModification |
( |
| ) |
|
|
pure virtual |
Start an image modification session. This will create a modification buffer that contains an uncompressed copy of the current image data.
The documentation for this class was generated from the following file:
- Gems/GradientSignal/Code/Include/GradientSignal/Ebuses/ImageGradientModificationBus.h