engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 属性 | 所有成员列表
FToolDataVisualizer类 参考

FToolDataVisualizer is a utility class for Tool and Gizmo implementations to use to draw 3D lines, points, etc. 更多...

#include <ToolDataVisualizer.h>

Public 成员函数

void BeginFrame (IToolsContextRenderAPI *RenderAPI)
 This must be called every frame to allow Visualizer to extract necessary rendering data/objects
 
void BeginFrame (IToolsContextRenderAPI *RenderAPI, const FViewCameraState &CameraState)
 This must be called every frame to allow Visualizer to extract necessary rendering data/objects
 
template<typename PointType >
void DrawCircle (const PointType &Position, const PointType &Normal, float Radius, int Steps, const FLinearColor &Color, float LineThicknessIn, bool bDepthTestedIn)
 Draw a 3D circle at given position/normal with the given parameters. 更多...
 
template<typename PointType >
void DrawLine (const PointType &A, const PointType &B)
 Draw a line with default parameters
 
template<typename PointType >
void DrawLine (const PointType &A, const PointType &B, const FLinearColor &Color)
 Draw a line with the given Color, otherwise use default parameters
 
template<typename PointType >
void DrawLine (const PointType &A, const PointType &B, const FLinearColor &Color, float LineThicknessIn)
 Draw a line with the given Color and Thickness, otherwise use default parameters
 
template<typename PointType >
void DrawLine (const PointType &A, const PointType &B, const FLinearColor &Color, float LineThicknessIn, bool bDepthTestedIn)
 Draw a line with the given parameters
 
template<typename PointType >
void DrawPoint (const PointType &Position)
 Draw a point with default parameters
 
template<typename PointType >
void DrawPoint (const PointType &Position, const FLinearColor &Color)
 Draw a point with the given Color, otherwise use default parameters
 
template<typename PointType >
void DrawPoint (const PointType &Position, const FLinearColor &Color, float PointSizeIn, bool bDepthTestedIn)
 Draw a point with the given parameters
 
template<typename PointType >
void DrawViewFacingCircle (const PointType &Position, float Radius, int Steps, const FLinearColor &Color, float LineThicknessIn, bool bDepthTestedIn)
 Draw a 3D circle at given position/normal with the given parameters. 更多...
 
void DrawWireBox (const FBox &Box)
 Draw a 3D box, parameterized the same as the 3D circle but extruded by Height
 
template<typename PointType >
void DrawWireCylinder (const PointType &Position, const PointType &Normal, float Radius, float Height, int Steps)
 Draw a 3D cylinder, parameterized the same as the 3D circle but extruded by Height
 
template<typename PointType >
void DrawWireCylinder (const PointType &Position, const PointType &Normal, float Radius, float Height, int Steps, const FLinearColor &Color, float LineThicknessIn, bool bDepthTestedIn)
 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 PopAllTransforms ()
 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, float Thickness)
 Update the default line color and thickness
 
void SetPointParameters (const FLinearColor &Color, float Size)
 Update the default point color and size
 
void SetTransform (const FTransform &Transform)
 Clear transform stack and push the given Transform
 
FVector TransformN (const FVector &Normal)
 
FVector TransformP (const FVector &Point)
 
FVector TransformV (const FVector &Vector)
 

Public 属性

bool bDepthTested = true
 Should lines be clipped by 3D geometry, or should they be drawn with quasi-transparency
 
float DepthBias = 0.0f
 Depth bias applied to lines
 
FLinearColor LineColor
 Default color used for drawing lines
 
float LineThickness = 1.0f
 Default thickness used for drawing lines
 
FLinearColor PointColor
 Default color used for drawing points
 
float PointSize = 1.0f
 Default size used for drawing points
 

Protected 属性

FPrimitiveDrawInterface * CurrentPDI = nullptr
 We use this for drawing, extracted in InitializeFrame
 

详细描述

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

成员函数说明

◆ DrawCircle()

template<typename PointType >
void FToolDataVisualizer::DrawCircle ( const PointType &  Position,
const PointType &  Normal,
float  Radius,
int  Steps,
const FLinearColor &  Color,
float  LineThicknessIn,
bool  bDepthTestedIn 
)
inline

Draw a 3D circle at given position/normal with the given parameters.

Tangent axes are defined internally

◆ DrawViewFacingCircle()

template<typename PointType >
void FToolDataVisualizer::DrawViewFacingCircle ( const PointType &  Position,
float  Radius,
int  Steps,
const FLinearColor &  Color,
float  LineThicknessIn,
bool  bDepthTestedIn 
)
inline

Draw a 3D circle at given position/normal with the given parameters.

Tangent axes are defined internally

◆ TransformN()

FVector FToolDataVisualizer::TransformN ( const FVector &  Normal)
inline
返回
input Normal transformed by transform stack

◆ TransformP()

FVector FToolDataVisualizer::TransformP ( const FVector &  Point)
inline
返回
input Point transformed by transform stack

◆ TransformV()

FVector FToolDataVisualizer::TransformV ( const FVector &  Vector)
inline
返回
input Vector transformed by transform stack

该类的文档由以下文件生成: