Open 3D Engine AzToolsFramework 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.
AzToolsFramework::BaseShapeComponentMode Class Reference

#include <BaseShapeComponentMode.h>

Inherits AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode, and ShapeComponentModeRequestBus::Handler.

Inherited by AzToolsFramework::BoxComponentMode, AzToolsFramework::CapsuleComponentMode, and AzToolsFramework::SphereComponentMode.

Public Member Functions

 BaseShapeComponentMode (const AZ::EntityComponentIdPair &entityComponentIdPair, const AZ::Uuid componentType, bool allowAsymmetricalEditing=false)
 
 BaseShapeComponentMode (const BaseShapeComponentMode &)=delete
 
BaseShapeComponentModeoperator= (const BaseShapeComponentMode &)=delete
 
 BaseShapeComponentMode (BaseShapeComponentMode &&)=delete
 
BaseShapeComponentModeoperator= (BaseShapeComponentMode &&)=delete
 
void Refresh () override
 
AZStd::vector< AzToolsFramework::ActionOverridePopulateActionsImpl () override
 
bool HandleMouseInteraction (const AzToolsFramework::ViewportInteraction::MouseInteractionEvent &mouseInteraction) override
 
ShapeComponentModeRequests::SubMode GetShapeSubMode () const override
 
void SetShapeSubMode (ShapeComponentModeRequests::SubMode mode) override
 
void ResetShapeSubMode () override
 
- Public Member Functions inherited from AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode
AZStd::vector< ActionOverridePopulateActions () final
 
AZStd::vector< ViewportUi::ClusterIdPopulateViewportUi () final
 Populate the Viewport UI widget for this ComponentMode.
 
void PostHandleMouseInteraction () final
 ComponentModeRequestBus ...
 

Static Public Member Functions

static AZ_CLASS_ALLOCATOR_DECL void RegisterActions (const char *shapeName)
 
static void BindActionsToModes (const char *shapeName, const char *className)
 
static void BindActionsToMenus (const char *shapeName)
 
- Static Public Member Functions inherited from AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode
static AZ_CLASS_ALLOCATOR_DECL void Reflect (AZ::ReflectContext *context)
 
static void RegisterActions ()
 
static void BindActionsToModes ()
 
static void BindActionsToMenus ()
 

Static Public Attributes

static constexpr const char *const DimensionsTooltip = "Switch to dimensions mode (1)"
 
static constexpr const char *const TranslationOffsetTooltip = "Switch to translation offset mode (2)"
 

Protected Member Functions

void SetupCluster ()
 
- Protected Member Functions inherited from AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode
AZ::EntityId GetEntityId () const
 The EntityId this ComponentMode instance is associated with.
 
AZ::EntityComponentIdPair GetEntityComponentIdPair () const
 
AZ::ComponentId GetComponentId () const final
 The ComponentId this ComponentMode instance is associated with.
 
AZ::Uuid GetComponentType () const final
 The underlying Component type for this ComponentMode.
 
AZ::Uuid GetComponentModeType () const
 
virtual AZStd::vector< ViewportUi::ClusterIdPopulateViewportUiImpl ()
 

Protected Attributes

ViewportUi::ClusterId m_clusterId
 
AZStd::array< ViewportUi::ButtonId, 2 > m_buttonIds
 Id for viewport cluster used to switch between modes.
 
AZStd::array< AZStd::unique_ptr< BaseShapeViewportEdit >, 2 > m_subModes
 
ShapeComponentModeRequests::SubMode m_subMode = ShapeComponentModeRequests::SubMode::Dimensions
 
bool m_allowAsymmetricalEditing = false
 
AZ::Event< AzToolsFramework::ViewportUi::ButtonId >::Handler m_modeSelectionHandler
 
AZ::EntityComponentIdPair m_entityComponentIdPair
 

Detailed Description

Base class for shape component modes. Handles common logic such as setting up sub-modes for dimensions and translation offset, handling mode selection, registering actions, etc.

Member Function Documentation

◆ PopulateActionsImpl()

AZStd::vector< AzToolsFramework::ActionOverride > AzToolsFramework::BaseShapeComponentMode::PopulateActionsImpl ( )
overridevirtual

EditorBaseComponentMode interface

See also
To be overridden by derived ComponentModes

Reimplemented from AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode.


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