Navigation
API > API/Plugins > API/Plugins/MeshModelingTools
This tool allows the user to draw and extrude 2D polygons
| Name | UDrawPolygonTool |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/MeshModelingTools/Public/DrawPolygonTool.h |
| Include Path | #include "DrawPolygonTool.h" |
Syntax
UCLASS (MinimalAPI)
class UDrawPolygonTool :
public UInteractiveTool ,
public IClickSequenceBehaviorTarget ,
public IInteractiveToolManageGeometrySelectionAPI
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInteractiveTool → UDrawPolygonTool
Implements Interfaces
- IClickSequenceBehaviorTarget
- IModifierToggleBehaviorTarget
- IInputBehaviorSource
- IInteractiveToolManageGeometrySelectionAPI
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UDrawPolygonTool() |
DrawPolygonTool.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AngleSnapModifier | int | DrawPolygonTool.h | |
| IgnoreSnappingModifier | int | Flags used to identify modifier keys/buttons | DrawPolygonTool.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bRestoreInputSelection | bool | If the drawn path is incomplete upon 'Accept' of the tool, no mesh should be created and the previous mesh element selection from before entering the tool should be restored | DrawPolygonTool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AppendVertex
(
const FVector3d& Vertex |
DrawPolygonTool.h | ||
| DrawPolygonTool.h | |||
virtual void BeginInteractiveExtrude() |
DrawPolygonTool.h | ||
virtual void EmitCurrentPolygon() |
DrawPolygonTool.h | ||
virtual void EndInteractiveExtrude() |
DrawPolygonTool.h | ||
virtual bool FindDrawPlaneHitPoint
(
const FInputDeviceRay& ClickPos, |
DrawPolygonTool.h | ||
virtual void ResetPolygon() |
Polygon drawing functions | DrawPolygonTool.h | |
void SetInitialDrawFrame
(
UE::Geometry::FFrame3d Frame |
DrawPolygonTool.h | ||
virtual void SetWorld
(
UWorld* World |
DrawPolygonTool.h | ||
virtual void UpdatePreviewVertex
(
const FVector3d& PreviewVertex |
DrawPolygonTool.h |
Overridden from UInteractiveTool
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanAccept() |
DrawPolygonTool.h | ||
virtual bool HasAccept() |
DrawPolygonTool.h | ||
virtual bool HasCancel() |
DrawPolygonTool.h | ||
virtual void OnTick
(
float DeltaTime |
DrawPolygonTool.h | ||
virtual void RegisterActions
(
FInteractiveToolActionSet& ActionSet |
DrawPolygonTool.h | ||
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
DrawPolygonTool.h | ||
virtual void Setup() |
DrawPolygonTool.h | ||
virtual void Shutdown
(
EToolShutdownType ShutdownType |
DrawPolygonTool.h |
Overridden from IClickSequenceBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeginClickSequence
(
const FInputDeviceRay& ClickPos |
DrawPolygonTool.h | ||
virtual void OnBeginClickSequence
(
const FInputDeviceRay& ClickPos |
DrawPolygonTool.h | ||
virtual void OnBeginSequencePreview
(
const FInputDeviceRay& ClickPos |
DrawPolygonTool.h | ||
virtual bool OnNextSequenceClick
(
const FInputDeviceRay& ClickPos |
DrawPolygonTool.h | ||
virtual void OnNextSequencePreview
(
const FInputDeviceRay& ClickPos |
DrawPolygonTool.h | ||
virtual void OnTerminateClickSequence() |
DrawPolygonTool.h | ||
virtual bool RequestAbortClickSequence() |
DrawPolygonTool.h |
Overridden from IModifierToggleBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnUpdateModifierState
(
int ModifierID, |
DrawPolygonTool.h |
Overridden from IInteractiveToolManageGeometrySelectionAPI
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsInputSelectionValidOnOutput() |
IInteractiveToolManageGeometrySelectionAPI - enables restoration of previous selection when applicable. | DrawPolygonTool.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AllowDrawPlaneUpdates() |
Whether to allow the draw plane to be updated in the UI returns false if there is an in-progress shape relying on the current draw plane | DrawPolygonTool.h | |
bool CheckInCurve
(
int32 Timestamp |
DrawPolygonTool.h | ||
| DrawPolygonTool.h | |||
bool GeneratePolygonMesh
(
const TArray< FVector3d >& Polygon, |
Generate extruded meshes. Returns true on success. | DrawPolygonTool.h | |
void GetPolygonParametersFromFixedPoints
(
const TArray< FVector3d >& FixedPoints, |
DrawPolygonTool.h | ||
void PlaneTransformChanged() |
Called on PlaneMechanic.OnPlaneChanged | DrawPolygonTool.h | |
void ShowExtrudeMessage() |
DrawPolygonTool.h | ||
void ShowStartupMessage() |
User feedback messages | DrawPolygonTool.h | |
| DrawPolygonTool.h | |||
void UpdateLivePreview() |
DrawPolygonTool.h | ||
bool UpdateSelfIntersection() |
Can close poly if current segment intersects existing segment | DrawPolygonTool.h |