#include <EditorHelpers.h>
Public Member Functions | |
| AZ_CLASS_ALLOCATOR_DECL | EditorHelpers (const EditorVisibleEntityDataCacheInterface *entityDataCache) |
| EditorHelpers (const EditorHelpers &)=delete | |
| EditorHelpers & | operator= (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 |
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.
|
explicit |
An EditorVisibleEntityDataCache must be passed to EditorHelpers to allow it to efficiently read entity data without resorting to EBus calls.
| 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.
| showIconCheck | Provide a custom callback to filter certain entities from displaying an icon under certain conditions. |
| 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.
| 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.