Navigation
API > API/Plugins > API/Plugins/MeshModelingTools
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractiveTool
- UDrawPolygonTool
References
| Module | MeshModelingTools |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/MeshModelingTools/Public/DrawPolygonTool.h |
| Include | #include "DrawPolygonTool.h" |
Syntax
UCLASS&40;&41;
class UDrawPolygonTool :
public UInteractiveTool,
public IClickSequenceBehaviorTarget
Remarks
This tool allows the user to draw and extrude 2D polygons
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAbortActivePolygonDraw | ||
| bool | bHasSavedExtrudeHeight | ||
| bool | bHaveSelfIntersection | ||
| bool | bHaveSurfaceHit | Only used when SnapSettings.bSnapToSurfaces = true | |
| bool | bIgnoreSnappingToggle | ||
| bool | bInFixedPolygonMode | ||
| bool | bInInteractiveExtrude | ||
| bool | bPreviewUpdatePending | ||
| FViewCameraState | CameraState | ||
| int32 | CurrentCurveTimestamp | ||
| TObjectPtr< UDragAlignmentMechanic > | DragAlignmentMechanic | ||
| TArray< FVector3d > | FixedPolygonClickPoints | ||
| TObjectPtr< UPlaneDistanceFromHitMechanic > | HeightMechanic | ||
| FVector3d | LastGridSnapPoint | ||
| ToolSceneQueriesUtil::FSnapGeometry | LastSnapGeometry | ||
| TObjectPtr< UNewMeshMaterialProperties > | MaterialProperties | ||
| TObjectPtr< UCreateMeshObjectTypeProperties > | OutputTypeProperties | Property set for type of output object (StaticMesh, Volume, etc) | |
| TObjectPtr< UConstructionPlaneMechanic > | PlaneMechanic | ||
| TArray< TArray< FVector3d > > | PolygonHolesVertices | Vertices of holes in current preview polygon | |
| TObjectPtr< UDrawPolygonToolStandardProperties > | PolygonProperties | Properties that control polygon generation exposed to user via details view | |
| TArray< FVector3d > | PolygonVertices | Vertices of current preview polygon | |
| TObjectPtr< UPreviewMesh > | PreviewMesh | ||
| FVector3d | PreviewVertex | Last vertex of polygon that is actively being updated as input device is moved | |
| float | SavedExtrudeHeight | ||
| FVector3d | SelfIntersectionPoint | ||
| int | SelfIntersectSegmentIdx | ||
| UE::Geometry::FPointPlanarSnapSolver | SnapEngine | ||
| TObjectPtr< UDrawPolygonToolSnapProperties > | SnapProperties | ||
| FVector3d | SurfaceHitPoint | ||
| FVector3d | SurfaceOffsetPoint | ||
| UWorld * | TargetWorld |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | 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 | ||
| void | AppendVertex
(
const FVector3d& Vertex |
||
| void | ApplyUndoPoints
(
const TArray< FVector3d >& ClickPointsIn, |
||
| void | |||
| bool | CheckInCurve
(
int32 Timestamp |
||
| void | |||
| void | |||
| bool | FindDrawPlaneHitPoint
(
const FInputDeviceRay& ClickPos, |
||
| void | GenerateFixedPolygon
(
const TArray< FVector3d >& FixedPoints, |
||
| bool | GeneratePolygonMesh
(
const TArray< FVector3d >& Polygon, |
Generate extruded meshes. Returns true on success. | |
| void | GetPolygonParametersFromFixedPoints
(
const TArray< FVector3d >& FixedPoints, |
||
| void | Called on PlaneMechanic.OnPlaneChanged | ||
| void | ResetPolygon () |
Polygon drawing functions | |
| void | |||
| void | |||
| void | User feedback messages | ||
| void | UndoCurrentOperation
(
const TArray< FVector3d >& ClickPointsIn, |
||
| void | |||
| void | UpdatePreviewVertex
(
const FVector3d& PreviewVertex |
||
| bool | Can close poly if current segment intersects existing segment |
Overridden from UInteractiveTool
| Type | Name | Description | |
|---|---|---|---|
| bool | CanAccept () |
||
| bool | HasAccept () |
||
| bool | HasCancel () |
||
| void | OnTick
(
float DeltaTime |
Allow the Tool to do any necessary processing on Tick | |
| void | RegisterActions
(
FInteractiveToolActionSet& ActionSet |
Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction. | |
| void | Render
(
IToolsContextRenderAPI* RenderAPI |
Allow the Tool to do any custom drawing (ie via PDI/RHI) | |
| void | Setup () |
Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called | |
| void | Shutdown
(
EToolShutdownType ShutdownType |
Called by ToolManager to shut down the Tool |
Overridden from IClickSequenceBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| bool | CanBeginClickSequence
(
const FInputDeviceRay& ClickPos |
Test if target would like to begin sequence based on this click. | |
| void | OnBeginClickSequence
(
const FInputDeviceRay& ClickPos |
Notify Target about the first click in the sequence. | |
| void | OnBeginSequencePreview
(
const FInputDeviceRay& ClickPos |
Notify Target device position has changed but a click sequence hasn't begun yet (eg for interactive previews) | |
| bool | OnNextSequenceClick
(
const FInputDeviceRay& ClickPos |
Notify Target about next click in sqeuence | |
| void | OnNextSequencePreview
(
const FInputDeviceRay& ClickPos |
Notify Target device position has changed but a click hasn't ocurred yet (eg for interactive previews) | |
| void | Notify Target that click sequence has been explicitly terminated (eg by escape key, cancel tool, etc). | ||
| bool | Target overrides this and returns true if it wants to abort click sequence. |
Overridden from IModifierToggleBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| void | OnUpdateModifierState
(
int ModifierID, |
Notify target of current modifier state |
Constants
| Name | Description |
|---|---|
| AngleSnapModifier | |
| IgnoreSnappingModifier | Flags used to identify modifier keys/buttons |