#include <GradientPreviewer.h>
Inherits AzToolsFramework::EntitySelectionEvents::Bus::Handler, and GradientPreviewContextRequestBus::Handler.
Public Member Functions | |
AZ_CLASS_ALLOCATOR (GradientPreviewer, AZ::SystemAllocator) | |
AZ_RTTI (GradientPreviewer, "{5962AFD7-0432-4D1D-9DF6-2046B1B78322}") | |
bool | GetPreviewSettingsVisible () const |
void | SetPreviewSettingsVisible (bool visible) |
void | Activate (AZ::EntityId ownerEntityId) |
void | Deactivate () |
AZ::EntityId | GetPreviewEntity () const override |
GradientPreviewContextRequestBus overrides ... | |
AZ::Aabb | GetPreviewBounds () const override |
bool | GetConstrainToShape () const override |
void | SetPreviewEntity (AZ::EntityId boundsEntityId) |
void | RefreshPreview () const |
Protected Attributes | |
AZ::EntityId | m_ownerEntityId |
The entity that owns the preview widget. | |
AZ::EntityId | m_boundsEntityId |
If set, this entity will be queried for the preview bounds. If not set, previewCenter / previewExtents will be used. | |
bool | m_constrainToShape = false |
If boundsEntityId is set, this determines whether to use the AABB of that entity or the actual shape inside the AABB. | |
AZ::Vector3 | m_previewCenter = AZ::Vector3(0.0f) |
If a specific entity is NOT defining the preview bounds, then define the preview bounds with a center point and extents. | |
AZ::Vector3 | m_previewExtents = AZ::Vector3(1.0f) |
bool | m_previewSettingsVisible = true |
1m sq preview...arbitrary default box size in meters chosen by design | |
GradientPreviewer is a helper class that abstracts all of the common functionality needed to have a gradient preview widget on a gradient Editor component. To use:
|
protected |
1m sq preview...arbitrary default box size in meters chosen by design
Controls whether or not to show the preview settings for this instance. The owning component can choose to hide the settings if it's in control of the preview settings (ex: Gradient Baker).