Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
FToolDataVisualizer is a utility class for Tool and Gizmo implementations to use to draw 3D lines, points, etc.
Currently uses PDI drawing but may use different back-ends in the future
| Name | FToolDataVisualizer |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/ToolDataVisualizer.h |
| Include Path | #include "ToolDataVisualizer.h" |
Syntax
class FToolDataVisualizer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FToolDataVisualizer
(
const FToolDataVisualizer& |
ToolDataVisualizer.h | ||
| ToolDataVisualizer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FToolDataVisualizer() |
ToolDataVisualizer.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArrowHeadSize | float | Default size used for drawing arrow heads | ToolDataVisualizer.h | |
| bDepthTested | bool | Should lines be clipped by 3D geometry, or should they be drawn with quasi-transparency | ToolDataVisualizer.h | |
| DepthBias | float | Depth bias applied to lines | ToolDataVisualizer.h | |
| LineColor | FLinearColor | Default color used for drawing lines | ToolDataVisualizer.h | |
| LineThickness | float | Default thickness used for drawing lines | ToolDataVisualizer.h | |
| PointColor | FLinearColor | Default color used for drawing points | ToolDataVisualizer.h | |
| PointSize | float | Default size used for drawing points | ToolDataVisualizer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginFrame
(
IToolsContextRenderAPI* RenderAPI, |
Frame initialization/cleanup This must be called every frame to allow Visualizer to extract necessary rendering data/objects | ToolDataVisualizer.h | |
void BeginFrame
(
IToolsContextRenderAPI* RenderAPI |
This must be called every frame to allow Visualizer to extract necessary rendering data/objects | ToolDataVisualizer.h | |
void DrawArc
(
const PointType& Position, |
Draw a 3D arc at given position/normal with the given parameters. | ToolDataVisualizer.h | |
void DrawCircle
(
const PointType& Position, |
Draw a 3D circle at given position/normal with the given parameters. | ToolDataVisualizer.h | |
void DrawDirectionalArrow
(
const PointType& A, |
Draw a line with the given parameters | ToolDataVisualizer.h | |
void DrawDirectionalArrow
(
const PointType& A, |
Draw a line with the given Color and Thickness, otherwise use default parameters | ToolDataVisualizer.h | |
void DrawDirectionalArrow
(
const PointType& A, |
Draw a line with the given Color, otherwise use default parameters | ToolDataVisualizer.h | |
void DrawDirectionalArrow
(
const PointType& A, |
Draw an arrow with default parameters | ToolDataVisualizer.h | |
| Draw a 3D disc at given position/normal with the given parameters. | ToolDataVisualizer.h | ||
void DrawGrid
(
const PointType& Center, |
ToolDataVisualizer.h | ||
void DrawGrid
(
const PointType& Center, |
ToolDataVisualizer.h | ||
void DrawLine
(
const PointType& A, |
Drawing functions Draw a line with default parameters | ToolDataVisualizer.h | |
void DrawLine
(
const PointType& A, |
Draw a line with the given Color, otherwise use default parameters | ToolDataVisualizer.h | |
void DrawLine
(
const PointType& A, |
Draw a line with the given Color and Thickness, otherwise use default parameters | ToolDataVisualizer.h | |
void DrawLine
(
const PointType& A, |
Draw a line with the given parameters | ToolDataVisualizer.h | |
void DrawPoint
(
const PointType& Position |
Draw a point with default parameters | ToolDataVisualizer.h | |
void DrawPoint
(
const PointType& Position, |
Draw a point with the given parameters | ToolDataVisualizer.h | |
void DrawPoint
(
const PointType& Position, |
Draw a point with the given Color, otherwise use default parameters | ToolDataVisualizer.h | |
void DrawSquare
(
const PointType& Center, |
ToolDataVisualizer.h | ||
void DrawSquare
(
const PointType& Center, |
ToolDataVisualizer.h | ||
void DrawViewFacingArc
(
const PointType& Position, |
Draw a 3D arc at given position/normal with the given parameters. | ToolDataVisualizer.h | |
void DrawViewFacingCircle
(
const PointType& Position, |
Draw a 3D circle at given position/normal with the given parameters. | ToolDataVisualizer.h | |
void DrawViewFacingX
(
const PointType& Position, |
Draw a world-space X facing the viewer at the given position. | ToolDataVisualizer.h | |
void DrawViewFacingX
(
const PointType& Position, |
Draw a world-space X facing the viewer at the given position. | ToolDataVisualizer.h | |
void DrawWireBox
(
const FBox& Box |
Draw a 3D box, parameterized the same as the 3D circle but extruded by Height | ToolDataVisualizer.h | |
void DrawWireBox
(
const FBox& Box, |
ToolDataVisualizer.h | ||
void DrawWireCylinder
(
const PointType& Position, |
Draw a 3D cylinder, parameterized the same as the 3D circle but extruded by Height | ToolDataVisualizer.h | |
void DrawWireCylinder
(
const PointType& Position, |
Draw a 3D cylinder, parameterized the same as the 3D circle but extruded by Height | ToolDataVisualizer.h | |
void EndFrame() |
This should be called at the end of every frame to allow for necessary cleanup | ToolDataVisualizer.h | |
void PopAllTransforms() |
Clear the transform stack to identity | ToolDataVisualizer.h | |
void PopTransform() |
Pop a transform from the transform stack | ToolDataVisualizer.h | |
void PushTransform
(
const FTransform& Transform |
Push a Transform onto the transform stack | ToolDataVisualizer.h | |
void SetLineParameters
(
const FLinearColor& Color, |
Parameters Update the default line color and thickness | ToolDataVisualizer.h | |
void SetPointParameters
(
const FLinearColor& Color, |
Update the default point color and size | ToolDataVisualizer.h | |
void SetTransform
(
const FTransform& Transform |
Transform support Clear transform stack and push the given Transform | ToolDataVisualizer.h | |
FVector TransformN
(
const FVector& Normal |
ToolDataVisualizer.h | ||
FVector TransformP
(
const FVector& Point |
ToolDataVisualizer.h | ||
FVector TransformV
(
const FVector& Vector |
ToolDataVisualizer.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InternalDrawArc
(
const FVector& InPosition, |
Actually does the arc drawing | ToolDataVisualizer.h | |
virtual void InternalDrawCircle
(
const FVector& Position, |
Actually does the circle drawing | ToolDataVisualizer.h | |
virtual void InternalDrawDirectionalArrow
(
const FVector& A, |
Actually does the arrow drawing; assumes A and B are already transformed | ToolDataVisualizer.h | |
virtual void InternalDrawDisc
(
const FVector& Position, |
Actually does the disc drawing | ToolDataVisualizer.h | |
virtual void InternalDrawGrid
(
const FVector& Center, |
Actually does the grid drawing | ToolDataVisualizer.h | |
virtual void InternalDrawGrid
(
const FVector& Center, |
Actually does the grid drawing | ToolDataVisualizer.h | |
virtual void InternalDrawSquare
(
const FVector& Center, |
Actually does the square drawing | ToolDataVisualizer.h | |
virtual void InternalDrawTransformedLine
(
const FVector& A, |
Actually does the line drawing; assumes A and B are already transformed | ToolDataVisualizer.h | |
virtual void InternalDrawTransformedPoint
(
const FVector& Position, |
Actually does the point drawing; assumes Position is already transformed | ToolDataVisualizer.h | |
virtual void InternalDrawViewFacingArc
(
const FVector& InPosition, |
Actually does the arc drawing | ToolDataVisualizer.h | |
virtual void InternalDrawViewFacingCircle
(
const FVector& Position, |
Actually does the circle drawing | ToolDataVisualizer.h | |
virtual void InternalDrawViewFacingX
(
const FVector& Position, |
Actually does the X drawing | ToolDataVisualizer.h | |
virtual void InternalDrawWireBox
(
const FBox& Box, |
Actually does the box drawing | ToolDataVisualizer.h | |
virtual void InternalDrawWireCylinder
(
const FVector& Position, |
Actually does the cylinder drawing | ToolDataVisualizer.h |