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.
|
#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 Member Functions | |
void | OnSelected () override |
AzToolsFramework::EntitySelectionEvents overrides ... | |
void | OnDeselected () override |
AZ::u32 | GetPreviewSettingsVisibility () const |
AZ::u32 | GetPreviewPositionVisibility () const |
AZ::u32 | GetPreviewSizeVisibility () const |
AZ::u32 | GetPreviewConstrainToShapeVisibility () const |
AZ::u32 | PreviewSettingsAndSettingsVisibilityChanged () const |
AZ::EntityId | GetActiveBoundsEntityId () const |
AZ::EntityId | GetGradientEntityId () const |
This is used by the preview so we can pass an invalid entity Id if our component is disabled. | |
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 More... | |
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).