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

#include <EditorHelpers.h>

Public Member Functions

AZ_CLASS_ALLOCATOR_DECL EditorHelpers (const EditorVisibleEntityDataCacheInterface *entityDataCache)
 
 EditorHelpers (const EditorHelpers &)=delete
 
EditorHelpersoperator= (const EditorHelpers &)=delete
 
CursorEntityIdQuery FindEntityIdUnderCursor (const AzFramework::CameraState &cameraState, const ViewportInteraction::MouseInteractionEvent &mouseInteraction)
 
void DisplayHelpers (const AzFramework::ViewportInfo &viewportInfo, const AzFramework::CameraState &cameraState, AzFramework::DebugDisplayRequests &debugDisplay, const AZStd::function< bool(AZ::EntityId)> &showIconCheck)
 
void Display2d (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay)
 Handle 2d drawing for EditorHelper functionality.
 
bool IsSelectableInViewport (AZ::EntityId entityId) const
 

Detailed Description

EditorHelpers are the visualizations that appear for entities when 'Display Helpers' is toggled on inside the editor. These include but are not limited to entity icons and shape visualizations.

Constructor & Destructor Documentation

◆ EditorHelpers()

AZ_CLASS_ALLOCATOR_DECL AzToolsFramework::EditorHelpers::EditorHelpers ( const EditorVisibleEntityDataCacheInterface entityDataCache)
explicit

An EditorVisibleEntityDataCache must be passed to EditorHelpers to allow it to efficiently read entity data without resorting to EBus calls.

Member Function Documentation

◆ DisplayHelpers()

void AzToolsFramework::EditorHelpers::DisplayHelpers ( const AzFramework::ViewportInfo &  viewportInfo,
const AzFramework::CameraState &  cameraState,
AzFramework::DebugDisplayRequests &  debugDisplay,
const AZStd::function< bool(AZ::EntityId)> &  showIconCheck 
)

Do the drawing responsible for the EditorHelpers.

Parameters
showIconCheckProvide a custom callback to filter certain entities from displaying an icon under certain conditions.

◆ FindEntityIdUnderCursor()

CursorEntityIdQuery AzToolsFramework::EditorHelpers::FindEntityIdUnderCursor ( const AzFramework::CameraState &  cameraState,
const ViewportInteraction::MouseInteractionEvent mouseInteraction 
)

Finds the id of the entity under the cursor (if any). For entities in container entities, also finds the topmost container entity id in the hierarchy. Used to check if a particular entity was selected.

◆ IsSelectableInViewport()

bool AzToolsFramework::EditorHelpers::IsSelectableInViewport ( AZ::EntityId  entityId) const

Returns whether the entityId can be selected in the viewport according to the current Editor Focus Mode and Container Entity setup.


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