Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
References
| Module | InteractiveToolsFramework |
| Header | /Engine/Source/Runtime/InteractiveToolsFramework/Public/ToolDataVisualizer.h |
| Include | #include "ToolDataVisualizer.h" |
Syntax
class FToolDataVisualizer
Remarks
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
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bDepthTested | Should lines be clipped by 3D geometry, or should they be drawn with quasi-transparency | |
| bool | bHaveCameraState | ||
| FViewCameraState | CameraState | ||
| FPrimitiveDrawInterface * | CurrentPDI | We use this for drawing, extracted in InitializeFrame | |
| float | DepthBias | Depth bias applied to lines | |
| FLinearColor | LineColor | Default color used for drawing lines | |
| float | LineThickness | Default thickness used for drawing lines | |
| float | PDISizeScale | Screen-space line thicknesses and point sizes are multiplied by this value to try to normalize for variable thickness that occurs at different FOVs. | |
| FLinearColor | PointColor | Default color used for drawing points | |
| float | PointSize | Default size used for drawing points | |
| FTransform | TotalTransform | ||
| TArray< FTransform > | TransformStack |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | BeginFrame
(
IToolsContextRenderAPI* RenderAPI, |
Frame initialization/cleanupThis must be called every frame to allow Visualizer to extract necessary rendering data/objects | |
| void | BeginFrame
(
IToolsContextRenderAPI* RenderAPI |
This must be called every frame to allow Visualizer to extract necessary rendering data/objects | |
| void | DrawCircle
(
const PointType& Position, |
Draw a 3D circle at given position/normal with the given parameters. | |
| void | DrawLine
(
const PointType& A, |
Drawing functionsDraw a line with default parameters | |
| void | DrawLine
(
const PointType& A, |
Draw a line with the given Color, otherwise use default parameters | |
| void | DrawLine
(
const PointType& A, |
Draw a line with the given Color and Thickness, otherwise use default parameters | |
| void | DrawLine
(
const PointType& A, |
Draw a line with the given parameters | |
| void | DrawPoint
(
const PointType& Position |
Draw a point with default parameters | |
| void | DrawPoint
(
const PointType& Position, |
Draw a point with the given Color, otherwise use default parameters | |
| void | DrawPoint
(
const PointType& Position, |
Draw a point with the given parameters | |
| void | DrawSquare
(
const PointType& Center, |
||
| void | DrawSquare
(
const PointType& Center, |
||
| void | DrawViewFacingCircle
(
const PointType& Position, |
Draw a 3D circle at given position/normal with the given parameters. | |
| void | DrawViewFacingX
(
const PointType& Position, |
Draw a world-space X facing the viewer at the given position. | |
| void | DrawViewFacingX
(
const PointType& Position, |
Draw a world-space X facing the viewer at the given position. | |
| void | DrawWireBox
(
const FBox& Box |
Draw a 3D box, parameterized the same as the 3D circle but extruded by Height | |
| void | DrawWireBox
(
const FBox& Box, |
||
| void | DrawWireCylinder
(
const PointType& Position, |
Draw a 3D cylinder, parameterized the same as the 3D circle but extruded by Height | |
| void | DrawWireCylinder
(
const PointType& Position, |
Draw a 3D cylinder, parameterized the same as the 3D circle but extruded by Height | |
| void | EndFrame () |
This should be called at the end of every frame to allow for necessary cleanup | |
| void | InternalDrawCircle
(
const FVector& Position, |
Actually does the circle drawing | |
| void | InternalDrawSquare
(
const FVector& Center, |
Actually does the square drawing | |
| void | InternalDrawTransformedLine
(
const FVector& A, |
Actually does the line drawing; assumes A and B are already transformed | |
| void | InternalDrawTransformedPoint
(
const FVector& Position, |
Actually does the point drawing; assumes Position is already transformed | |
| void | InternalDrawViewFacingCircle
(
const FVector& Position, |
Actually does the circle drawing | |
| void | InternalDrawViewFacingX
(
const FVector& Position, |
Actually does the X drawing | |
| void | InternalDrawWireBox
(
const FBox& Box, |
Actually does the box drawing | |
| void | InternalDrawWireCylinder
(
const FVector& Position, |
Actually does the cylinder drawing | |
| void | Clear the transform stack to identity | ||
| void | PopTransform () |
Pop a transform from the transform stack | |
| void | PushTransform
(
const FTransform& Transform |
Push a Transform onto the transform stack | |
| void | SetLineParameters
(
const FLinearColor& Color, |
ParametersUpdate the default line color and thickness | |
| void | SetPointParameters
(
const FLinearColor& Color, |
Update the default point color and size | |
| void | SetTransform
(
const FTransform& Transform |
Transform supportClear transform stack and push the given Transform | |
| FVector | TransformN
(
const FVector& Normal |
||
| FVector | TransformP
(
const FVector& Point |
||
| FVector | TransformV
(
const FVector& Vector |