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::EditorTransformComponentSelection Class Reference

#include <EditorTransformComponentSelection.h>

Inherits AzToolsFramework::ViewportInteraction::ViewportSelectionRequests, ActionManagerRegistrationNotificationBus::Handler, EditorContextMenuBus::Handler, EditorTransformComponentSelectionRequestBus::Handler, ToolsApplicationNotificationBus::Handler, Camera::EditorCameraNotificationBus::Handler, ViewportEditorModeNotificationsBus::Handler, EditorEntityContextNotificationBus::Handler, EditorEntityVisibilityNotificationBus::Router, EditorEntityLockComponentNotificationBus::Router, EditorManipulatorCommandUndoRedoRequestBus::Handler, AZ::TransformNotificationBus::MultiHandler, ViewportInteraction::ViewportSettingsNotificationBus::Handler, and ReadOnlyEntityPublicNotificationBus::Handler.

Public Member Functions

 EditorTransformComponentSelection (const EditorVisibleEntityDataCacheInterface *entityDataCache)
 
 EditorTransformComponentSelection (const EditorTransformComponentSelection &)=delete
 
EditorTransformComponentSelectionoperator= (const EditorTransformComponentSelection &)=delete
 
void RegisterManipulator ()
 
void UnregisterManipulator ()
 
bool HandleMouseInteraction (const ViewportInteraction::MouseInteractionEvent &mouseInteraction) override
 
void DisplayViewportSelection (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) override
 
void DisplayViewportSelection2d (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) override
 
void AddEntityToSelection (AZ::EntityId entityId)
 Add an entity to the current selection.
 
void RemoveEntityFromSelection (AZ::EntityId entityId)
 Remove an entity from the current selection.
 
virtual void DisplayViewportSelection (const AzFramework::ViewportInfo &, AzFramework::DebugDisplayRequests &)
 
virtual void DisplayViewportSelection2d (const AzFramework::ViewportInfo &, AzFramework::DebugDisplayRequests &)
 
virtual bool HandleMouseInteraction (const MouseInteractionEvent &)
 Implement this function to handle a particular mouse event.
 

Detailed Description

Entity selection/interaction handling. Provide a suite of functionality for manipulating entities, primarily through their TransformComponent.

Member Function Documentation

◆ DisplayViewportSelection()

void AzToolsFramework::EditorTransformComponentSelection::DisplayViewportSelection ( const AzFramework::ViewportInfo &  ,
AzFramework::DebugDisplayRequests &   
)
overridevirtual

Display drawing in world space. DisplayViewportSelection is called from EditorInteractionSystemComponent::DisplayViewport. DisplayViewport exists on the AzFramework::ViewportDebugDisplayEventBus and is called from CRenderViewport. DisplayViewportSelection is called after CalculateVisibleEntityDatas on the EditorVisibleEntityDataCache, this ensures usage of the entity cache will be up to date (do not implement AzFramework::ViewportDebugDisplayEventBus directly if wishing to use the EditorVisibleEntityDataCache).

Reimplemented from AzToolsFramework::ViewportInteraction::ViewportDisplayNotifications.

◆ DisplayViewportSelection2d()

void AzToolsFramework::EditorTransformComponentSelection::DisplayViewportSelection2d ( const AzFramework::ViewportInfo &  ,
AzFramework::DebugDisplayRequests &   
)
overridevirtual

Display drawing in screen space. DisplayViewportSelection2d is called after DisplayViewportSelection when the viewport has been configured to be orthographic in CRenderViewport. All screen space drawing can be performed here.

Reimplemented from AzToolsFramework::ViewportInteraction::ViewportDisplayNotifications.

◆ HandleMouseInteraction()

bool AzToolsFramework::EditorTransformComponentSelection::HandleMouseInteraction ( const ViewportInteraction::MouseInteractionEvent mouseInteraction)
overridevirtual

ViewportInteraction::ViewportSelectionRequests Intercept all viewport mouse events and respond to inputs.

Reimplemented from AzToolsFramework::ViewportInteraction::MouseViewportRequests.

◆ RegisterManipulator()

void AzToolsFramework::EditorTransformComponentSelection::RegisterManipulator ( )

Register entity manipulators with the ManipulatorManager. After being registered, the entity manipulators will draw and check for input.

◆ UnregisterManipulator()

void AzToolsFramework::EditorTransformComponentSelection::UnregisterManipulator ( )

Unregister entity manipulators with the ManipulatorManager. No longer draw or respond to input.


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