Navigation
API > API/Plugins > API/Plugins/MeshModelingToolsExp
Inheritance Hierarchy
- UInteractiveTool
- IClickDragBehaviorTarget
- IHoverBehaviorTarget
- IDynamicMeshOperatorFactory
- IInteractiveToolNestedAcceptCancelAPI
- IInteractiveToolCameraFocusAPI
- UCubeGridTool
References
| Module | MeshModelingToolsExp |
| Header | /Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Public/CubeGridTool.h |
| Include | #include "CubeGridTool.h" |
Syntax
UCLASS ()
class UCubeGridTool :
public UInteractiveTool ,
public IClickDragBehaviorTarget ,
public IHoverBehaviorTarget ,
public UE::Geometry::IDynamicMeshOperatorFactory ,
public IInteractiveToolNestedAcceptCancelAPI ,
public IInteractiveToolCameraFocusAPI
Remarks
Tool that allows for blocky boolean operations on an orientable power-of-two grid.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bAdjustSelectionOnPreviewUpdate | ||
| bool | bBlockUntilPreviewUpdate | ||
| bool | bChangeSideToggle | ||
| bool | bChangesMade | Used to see if we need to update the asset that we've been modifying. | |
| bool | bHaveHoveredSelection | ||
| bool | bHaveSelection | ||
| bool | bInGizmoDrag | ||
| int32 | BlockBaseSizeWatcherIdx | ||
| bool | bMouseDragShouldPushPull | ||
| bool | bPreviewMayDiffer | ||
| bool | bPreviousHaveSelection | ||
| bool | bSelectionToggle | ||
| bool | bSlideToggle | ||
| bool | bWaitingToApplyPreview | ||
| FViewCameraState | CameraState | ||
| TObjectPtr< UClickDragInputBehavior > | ClickDragBehavior | ||
| TSharedPtr< const UE::Geometry::FDynamicMesh3, ESPMode::ThreadSafe > | ComputeStartMesh | Safe inputs for the background compute to use, untouched by undo/redo/other CurrentMesh updates. | |
| bool[4] | CornerSelectedFlags | Used in corner push/pull mode. | |
| UE::Geometry::FGeometrySet3 | CornersGeometrySet | ||
| TObjectPtr< ULocalSingleClickInputBehavior > | CtrlMiddleClickBehavior | ||
| TSharedPtr< FCubeGrid, ESPMode::ThreadSafe > | CubeGrid | ||
| int32 | CurrentBlockSizeWatcherIdx | ||
| int32 | CurrentExtrudeAmount | ||
| TSharedPtr< UE::Geometry::FDynamicMesh3, ESPMode::ThreadSafe > | CurrentMesh | ||
| TArray< UMaterialInterface * > | CurrentMeshMaterials | ||
| UE::Geometry::FTransformSRT3d | CurrentMeshTransform | ||
| double | DragProjectedStartParam | ||
| FRay3d | DragProjectionAxis | ||
| int32 | DragStartExtrudeAmount | ||
| int32 | GridFrameOrientationWatcherIdx | ||
| int32 | GridFrameOriginWatcherIdx | ||
| TObjectPtr< UCombinedTransformGizmo > | GridGizmo | ||
| TObjectPtr< UDragAlignmentMechanic > | GridGizmoAlignmentMechanic | ||
| TObjectPtr< UTransformProxy > | GridGizmoTransformProxy | ||
| int32 | GridPowerWatcherIdx | ||
| TObjectPtr< UMouseHoverBehavior > | HoverBehavior | ||
| UE::Geometry::FAxisAlignedBox3d | HoveredSelectionBox | ||
| TSharedPtr< TArray< int32 >, ESPMode::ThreadSafe > | LastOpChangedTids | ||
| TObjectPtr< UPreviewGeometry > | LineSets | ||
| TObjectPtr< UNewMeshMaterialProperties > | MaterialProperties | ||
| TSharedPtr< UE::Geometry::FDynamicMeshAABBTree3, ESPMode::ThreadSafe > | MeshSpatial | ||
| TObjectPtr< ULocalClickDragInputBehavior > | MiddleClickDragBehavior | ||
| FVector3d | MiddleClickDragStart | ||
| EMode | Mode | Important state. Could refactor things into tool activities (like PolyEdit) someday. | |
| EMouseState | MouseState | ||
| TArray< int32, TFixedAllocator< 4 > > | OpMeshAddSideGroups | ||
| double | OpMeshHeightUVOffset | These are used to keep UV's and side groups consistent across multiple E/Q (push/pull) presses. | |
| int32 | OpMeshMaterialID | ||
| TArray< int32, TFixedAllocator< 4 > > | OpMeshSubtractSideGroups | ||
| TObjectPtr< UCreateMeshObjectTypeProperties > | OutputTypeProperties | ||
| ECubeGridToolAction | PendingAction | ||
| bool[4] | PreDragCornerSelectedFlags | ||
| TObjectPtr< UMeshOpPreviewWithBackgroundCompute > | Preview | ||
| FSelection | PreviousSelection | ||
| FToolDataVisualizer | SelectedCornerRenderer | ||
| FSelection | Selection | ||
| TObjectPtr< UCubeGridToolProperties > | Settings | Properties, etc. | |
| TObjectPtr< UToolTarget > | Target | Existing asset to modify, if one was selected. | |
| TObjectPtr< UWorld > | TargetWorld | Where to make the preview, new mesh, etc. | |
| TObjectPtr< UCubeGridToolActions > | ToolActions |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | ApplyAction
(
ECubeGridToolAction ActionType |
||
| void | ApplyCornerMode
(
bool bDontWaitForTick |
||
| void | |||
| void | ApplyPreview () |
||
| void | ApplyPushPull
(
int32 NumBlocks |
||
| void | ApplySlide
(
int32 NumBlocks |
||
| void | AttemptToSelectCorner
(
const FRay3d& WorldRay |
||
| FInputRayHit | CanBeginMiddleClickDrag
(
const FInputDeviceRay& ClickPos |
||
| void | |||
| void | ClearHover () |
||
| void | ClearSelection
(
bool bEmitChange |
||
| void | |||
| void | |||
| bool | GetHitGridFace
(
const FRay& WorldRay, |
||
| void | GridGizmoMoved
(
UTransformProxy* Proxy, |
||
| void | InvalidatePreview
(
bool bUpdateCornerLineSet |
||
| bool | |||
| bool | |||
| void | OnCtrlMiddleClick
(
const FInputDeviceRay& ClickPos |
||
| void | OnMiddleClickDrag
(
const FInputDeviceRay& DragPos |
||
| void | OutputCurrentResults
(
bool bSetSelection |
||
| void | |||
| FInputRayHit | RayCastSelectionPlane
(
const FRay3d& WorldRay, |
||
| void | RequestAction
(
ECubeGridToolAction ActionType |
||
| void | |||
| void | |||
| void | SetChangesMade
(
bool bChangesMadeIn |
||
| void | SetCornerSelection
(
bool CornerSelectedFlags |
||
| void | SetCurrentExtrudeAmount
(
int32 ExtrudeAmount |
||
| void | SetCurrentMeshTransform
(
const FTransform& TransformIn |
||
| void | SetGridPowerClamped
(
int32 GridPower |
Parameter is signed on purpose so we can give negatives for clamping. | |
| void | SetInitialGridPivot
(
FVector3d PivotPos |
||
| void | SetSelection
(
const FSelection& Selection, |
||
| void | SetTarget
(
TObjectPtr< UToolTarget > TargetIn |
||
| void | |||
| void | SlideSelection
(
int32 ExtrudeAmount, |
||
| void | |||
| void | |||
| void | |||
| void | |||
| void | UpdateGizmoVisibility
(
bool bVisible |
||
| void | UpdateGridGizmo
(
const FTransform& NewTransform, |
Updates the gizmo controlling the cube grid transform. | |
| void | |||
| void | UpdateGridTransform
(
const FTransform& NewTransform, |
Updates the cube grid. | |
| bool | UpdateHover
(
const FRay& WorldRay |
||
| void | UpdateHoverLineSet
(
bool bHaveHover, |
||
| void | |||
| void | |||
| void | UpdateUsingMeshChange
(
const UE::Geometry::FDynamicMeshChange& MeshChange, |
Used by undo/redo. |
Overridden from UInteractiveTool
| Type | Name | Description | |
|---|---|---|---|
| bool | CanAccept () |
||
| void | DrawHUD
(
FCanvas* Canvas, |
Allow the Tool to do any custom screen space drawing | |
| bool | HasAccept () |
||
| bool | HasCancel () |
||
| void | OnPropertyModified
(
UObject* PropertySet, |
Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes | |
| 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 IClickDragBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | CanBeginClickDragSequence
(
const FInputDeviceRay& PressPos |
IClickDragBehaviorTarget. | |
| void | OnClickDrag
(
const FInputDeviceRay& DragPos |
Notify Target that input position has changed | |
| void | OnClickPress
(
const FInputDeviceRay& PressPos |
Notify Target that click press ocurred | |
| void | OnClickRelease
(
const FInputDeviceRay& ReleasePos |
Notify Target that click release occurred | |
| void | Notify Target that click-drag sequence has been explicitly terminated (eg by escape key) |
Overridden from IModifierToggleBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| void | OnUpdateModifierState
(
int ModifierID, |
Notify target of current modifier state |
Overridden from IHoverBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | BeginHoverSequenceHitTest
(
const FInputDeviceRay& PressPos |
IHoverBehaviorTarget. | |
| void | OnBeginHover
(
const FInputDeviceRay& DevicePos |
Initialize hover sequence at given position | |
| void | OnEndHover () |
Terminate active hover sequence | |
| bool | OnUpdateHover
(
const FInputDeviceRay& DevicePos |
Update active hover sequence with new input position |
Overridden from IDynamicMeshOperatorFactory
| Type | Name | Description | |
|---|---|---|---|
| TUniquePtr< UE::Geometry::FDynamicMeshOperator > | IDynamicMeshOperatorFactory API. |
Overridden from IInteractiveToolNestedAcceptCancelAPI
| Type | Name | Description | |
|---|---|---|---|
| bool | |||
| bool | |||
| bool | Called by Editor levels to tell the implementor (eg Tool) to execute a nested Accept action | ||
| bool | Called by Editor levels to tell the implementor (eg Tool) to execute a nested Cancel action | ||
| bool | |||
| bool | IInteractiveToolNestedAcceptCancelAPI. |
Overridden from IInteractiveToolCameraFocusAPI
| Type | Name | Description | |
|---|---|---|---|
| FBox | |||
| bool | IInteractiveToolCameraFocusAPI. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FSelection |
Enums
| Type | Name | Description | |
|---|---|---|---|
| EMode | |||
| EMouseState |
Typedefs
| Name | Description |
|---|---|
| FCubeGrid |
Constants
| Name | Description |
|---|---|
| CtrlModifierID | |
| ShiftModifierID |