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

Inherits AZ::EBusTraits.

Public Member Functions

virtual void DrawAabb ([[maybe_unused]] const AZ::Aabb &aabb, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawAabbOnEntity ([[maybe_unused]] const AZ::EntityId &targetEntity, [[maybe_unused]] const AZ::Aabb &aabb, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawLineLocationToLocation ([[maybe_unused]] const AZ::Vector3 &startLocation, [[maybe_unused]] const AZ::Vector3 &endLocation, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawLineBatchLocationToLocation ([[maybe_unused]] const AZStd::vector< DebugDraw::DebugDrawLineElement > &lineBatch)
 
virtual void DrawLineEntityToLocation ([[maybe_unused]] const AZ::EntityId &startEntity, [[maybe_unused]] const AZ::Vector3 &endLocation, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawLineEntityToEntity ([[maybe_unused]] const AZ::EntityId &startEntity, [[maybe_unused]] const AZ::EntityId &endEntity, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawObb ([[maybe_unused]] const AZ::Obb &obb, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawObbOnEntity ([[maybe_unused]] const AZ::EntityId &targetEntity, [[maybe_unused]] const AZ::Obb &obb, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] bool enableRayTracing, [[maybe_unused]] float duration)
 
virtual void DrawTextAtLocation ([[maybe_unused]] const AZ::Vector3 &worldLocation, [[maybe_unused]] const AZStd::string &text, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawTextOnEntity ([[maybe_unused]] const AZ::EntityId &targetEntity, [[maybe_unused]] const AZStd::string &text, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawTextOnScreen ([[maybe_unused]] const AZStd::string &text, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawScaledTextOnScreen ([[maybe_unused]] const AZStd::string &text, [[maybe_unused]] float fontScale, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawScaledTextOnScreenPos ([[maybe_unused]] float x, [[maybe_unused]] float y, [[maybe_unused]] const AZStd::string &text, [[maybe_unused]] float fontScale, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration, [[maybe_unused]] bool bCenter=true)
 
virtual void DrawRayLocationToDirection ([[maybe_unused]] const AZ::Vector3 &worldLocation, [[maybe_unused]] const AZ::Vector3 &worldDirection, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawRayEntityToDirection ([[maybe_unused]] const AZ::EntityId &startEntity, [[maybe_unused]] const AZ::Vector3 &worldDirection, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawRayEntityToEntity ([[maybe_unused]] const AZ::EntityId &startEntity, [[maybe_unused]] const AZ::EntityId &endEntity, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawSphereAtLocation ([[maybe_unused]] const AZ::Vector3 &worldLocation, [[maybe_unused]] float radius, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] float duration)
 
virtual void DrawSphereOnEntity ([[maybe_unused]] const AZ::EntityId &targetEntity, [[maybe_unused]] float radius, [[maybe_unused]] const AZ::Color &color, [[maybe_unused]] bool enableRayTracing, [[maybe_unused]] float duration)
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single
 

Member Function Documentation

◆ DrawAabb()

virtual void DebugDraw::DebugDrawRequests::DrawAabb ( [[maybe_unused] ] const AZ::Aabb &  aabb,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws an axis-aligned bounding-box (Aabb) in the world centered at worldLocation

Parameters
worldLocationWorld location for the Aabb to be centered at
aabbAabb to render
colorColor of Aabb
durationHow long to display the Aabb for; 0 value will draw for one frame; negative values draw forever

◆ DrawAabbOnEntity()

virtual void DebugDraw::DebugDrawRequests::DrawAabbOnEntity ( [[maybe_unused] ] const AZ::EntityId &  targetEntity,
[[maybe_unused] ] const AZ::Aabb &  aabb,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws an axis-aligned bounding-box (Aabb) in the world centered at targetEntity's location

Parameters
targetEntityEntity for the world location of the Aabb to be centered at
AabbAabb to render
colorColor of Aabb
durationHow long to display the Aabb for; 0 value will draw for one frame; negative values draw forever

◆ DrawLineBatchLocationToLocation()

virtual void DebugDraw::DebugDrawRequests::DrawLineBatchLocationToLocation ( [[maybe_unused] ] const AZStd::vector< DebugDraw::DebugDrawLineElement > &  lineBatch)
inlinevirtual

Draw a batch of lines in the world

Parameters
lineBatchA collection of lines

◆ DrawLineEntityToEntity()

virtual void DebugDraw::DebugDrawRequests::DrawLineEntityToEntity ( [[maybe_unused] ] const AZ::EntityId &  startEntity,
[[maybe_unused] ] const AZ::EntityId &  endEntity,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a line in the world from an entity to a location for a specified duration

Parameters
startEntityEntity for the world location of the line to start at
endEntityEntity for the world location of the line to end at
colorColor of line
durationHow long to display the line for; 0 value will draw for one frame; negative values draw forever

◆ DrawLineEntityToLocation()

virtual void DebugDraw::DebugDrawRequests::DrawLineEntityToLocation ( [[maybe_unused] ] const AZ::EntityId &  startEntity,
[[maybe_unused] ] const AZ::Vector3 &  endLocation,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a line in the world from an entity to a location for a specified duration

Parameters
startEntityEntity for the world location of the line to start at
endLocationWorld location for the line to end at
colorColor of line
durationHow long to display the line for; 0 value will draw for one frame; negative values draw forever

◆ DrawLineLocationToLocation()

virtual void DebugDraw::DebugDrawRequests::DrawLineLocationToLocation ( [[maybe_unused] ] const AZ::Vector3 &  startLocation,
[[maybe_unused] ] const AZ::Vector3 &  endLocation,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a line in the world for a specified duration

Parameters
startLocationWorld location for the line to start at
endLocationWorld location for the line to end at
colorColor of line
durationHow long to display the line for; 0 value will draw for one frame; negative values draw forever

◆ DrawObb()

virtual void DebugDraw::DebugDrawRequests::DrawObb ( [[maybe_unused] ] const AZ::Obb &  obb,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws an oriented bounding-box (Obb) in the world

Parameters
obbObb to render
colorColor of Obb
durationHow long to display the Obb for; 0 value will draw for one frame; negative values draw forever

◆ DrawObbOnEntity()

virtual void DebugDraw::DebugDrawRequests::DrawObbOnEntity ( [[maybe_unused] ] const AZ::EntityId &  targetEntity,
[[maybe_unused] ] const AZ::Obb &  obb,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] bool  enableRayTracing,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws an oriented bounding-box (Obb) in the world centered at targetEntity's location and in entity space (rotates/scales with entity)

Parameters
targetEntityEntity for the Obb to be transformed by (located at entity location, rotates/scales with entity)
ObbObb to render
colorColor of Obb
durationHow long to display the Obb for; 0 value will draw for one frame; negative values draw forever

◆ DrawRayEntityToDirection()

virtual void DebugDraw::DebugDrawRequests::DrawRayEntityToDirection ( [[maybe_unused] ] const AZ::EntityId &  startEntity,
[[maybe_unused] ] const AZ::Vector3 &  worldDirection,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a ray in the world starting at an entity's location for a specified duration

Parameters
startEntityEntity for the world location of the ray to start at
worldDirectionWorld direction for the ray to draw towards
colorColor of ray
durationHow long to display the ray for; 0 value will draw for one frame; negative values draw forever

◆ DrawRayEntityToEntity()

virtual void DebugDraw::DebugDrawRequests::DrawRayEntityToEntity ( [[maybe_unused] ] const AZ::EntityId &  startEntity,
[[maybe_unused] ] const AZ::EntityId &  endEntity,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a ray in the world starting at an entity's location and ending at another's for a specified duration

Parameters
startEntityEntity for the world location of the ray to start at
endEntityEntity for the world location of the ray to end at
colorColor of ray
durationHow long to display the ray for; 0 value will draw for one frame; negative values draw forever

◆ DrawRayLocationToDirection()

virtual void DebugDraw::DebugDrawRequests::DrawRayLocationToDirection ( [[maybe_unused] ] const AZ::Vector3 &  worldLocation,
[[maybe_unused] ] const AZ::Vector3 &  worldDirection,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a ray in the world for a specified duration

Parameters
worldLocationWorld location for the ray to start at
worldDirectionWorld direction for the ray to draw towards
colorColor of ray
durationHow long to display the ray for; 0 value will draw for one frame; negative values draw forever

◆ DrawScaledTextOnScreen()

virtual void DebugDraw::DebugDrawRequests::DrawScaledTextOnScreen ( [[maybe_unused] ] const AZStd::string &  text,
[[maybe_unused] ] float  fontScale,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws text on the screen with scaled default render font.

Parameters
textText to be displayed.
fontScaleScale factor to default render font.
colorColor of text.
durationHow long to display the text for (in seconds); 0 value will draw for one frame; negative values draw forever.

◆ DrawScaledTextOnScreenPos()

virtual void DebugDraw::DebugDrawRequests::DrawScaledTextOnScreenPos ( [[maybe_unused] ] float  x,
[[maybe_unused] ] float  y,
[[maybe_unused] ] const AZStd::string &  text,
[[maybe_unused] ] float  fontScale,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration,
[[maybe_unused] ] bool  bCenter = true 
)
inlinevirtual

Draws text on the screen with scaled default render font at given 2D coordinates.

Parameters
xX coordinate.
yY coordinate.
textText to be displayed.
fontScaleScale factor to default render font.
colorColor of text.
durationHow long to display the text for (in seconds); 0 value will draw for one frame; negative values draw forever.
bCenterIf true (default), centers drawn text relative to x coordinate, otherwise text is left-aligned.

◆ DrawSphereAtLocation()

virtual void DebugDraw::DebugDrawRequests::DrawSphereAtLocation ( [[maybe_unused] ] const AZ::Vector3 &  worldLocation,
[[maybe_unused] ] float  radius,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a sphere in the world centered at worldLocation

Parameters
worldLocationWorld location for the sphere to be centered at
radiusRadius of the sphere
colorColor of sphere
durationHow long to display the sphere for; 0 value will draw for one frame; negative values draw forever

◆ DrawSphereOnEntity()

virtual void DebugDraw::DebugDrawRequests::DrawSphereOnEntity ( [[maybe_unused] ] const AZ::EntityId &  targetEntity,
[[maybe_unused] ] float  radius,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] bool  enableRayTracing,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws a sphere in the world centered at targetEntity's location

Parameters
targetEntityEntity for the world location of the sphere to be centered at
radiusRadius of the sphere
colorColor of sphere
durationHow long to display the sphere for; 0 value will draw for one frame; negative values draw forever

◆ DrawTextAtLocation()

virtual void DebugDraw::DebugDrawRequests::DrawTextAtLocation ( [[maybe_unused] ] const AZ::Vector3 &  worldLocation,
[[maybe_unused] ] const AZStd::string &  text,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws text in the world centered at worldLocation

Parameters
worldLocationWorld location for the text to be centered at
textText to be displayed
colorColor of text
durationHow long to display the text for; 0 value will draw for one frame; negative values draw forever

◆ DrawTextOnEntity()

virtual void DebugDraw::DebugDrawRequests::DrawTextOnEntity ( [[maybe_unused] ] const AZ::EntityId &  targetEntity,
[[maybe_unused] ] const AZStd::string &  text,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws text in the world at targetEntity's location

Parameters
targetEntityEntity for the world location of the text to be centered at
textText to be displayed
colorColor of text
durationHow long to display the text for; 0 value will draw for one frame; negative values draw forever

◆ DrawTextOnScreen()

virtual void DebugDraw::DebugDrawRequests::DrawTextOnScreen ( [[maybe_unused] ] const AZStd::string &  text,
[[maybe_unused] ] const AZ::Color &  color,
[[maybe_unused] ] float  duration 
)
inlinevirtual

Draws text on the screen

Parameters
textText to be displayed. prefix with "-category:Name " for automatic grouping of screen text Ex: "-category:MyRenderingInfo FPS:60" will draw "FPS:60" in a MyRenderingInfo category box
colorColor of text
durationHow long to display the text for; 0 value will draw for one frame; negative values draw forever

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