Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Mechanics
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractionMechanic
- UCollisionPrimitivesMechanic
References
| Module | ModelingComponents |
| Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/CollisionPrimitivesMechanic.h |
| Include | #include "Mechanics/CollisionPrimitivesMechanic.h" |
Syntax
UCLASS&40;&41;
class UCollisionPrimitivesMechanic :
public UInteractionMechanic,
public IClickBehaviorTarget,
public IHoverBehaviorTarget
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bCtrlToggle | ||
| bool | bGizmoBeingDragged | Used to make it easy to tell whether the gizmo was moved by the user or by undo/redo or some other change that we shouldn't respond to. | |
| bool | bIsDraggingRectangle | ||
| TObjectPtr< UCombinedTransformGizmo > | BoxTransformGizmo | ||
| TObjectPtr< UTransformProxy > | BoxTransformProxy | ||
| bool | bShiftToggle | Support for Shift and Ctrl toggle. | |
| FViewCameraState | CachedCameraState | ||
| TObjectPtr< UCombinedTransformGizmo > | CapsuleTransformGizmo | ||
| TObjectPtr< UTransformProxy > | CapsuleTransformProxy | ||
| TObjectPtr< UTransformProxy > | CurrentActiveProxy | ||
| int32 | CurrentChangeStamp | Used for expiring undo/redo changes, which compare this to their stored value and expire themselves if they do not match. | |
| TArray< int32 > | CurrentDragSelection | ||
| TMap< int32, int32 > | CurveToPrimitiveLookup | ||
| float | DepthBias | ||
| TObjectPtr< ULineSetComponent > | DrawnPrimitiveEdges | ||
| TObjectPtr< UCombinedTransformGizmo > | FullTransformGizmo | ||
| TObjectPtr< UTransformProxy > | FullTransformProxy | ||
| UE::Geometry::FGeometrySet3 | GeometrySet | Used for spatial queries. | |
| TFunction< bool(const FVector3d &, const FVector3d &)> | GeometrySetToleranceTest | Support for hovering. | |
| FVector | GizmoStartPosition | The starting point of the gizmo is needed to determine the offset by which to move the points. | |
| FQuat | GizmoStartRotation | ||
| FVector | GizmoStartScale | ||
| FColor | HoverColor | ||
| int32 | HoveredPrimitiveID | ||
| FTransform3d | LocalToWorldTransform | ||
| TObjectPtr< URectangleMarqueeMechanic > | MarqueeMechanic | Support for selection. | |
| UE::Geometry::FAxisAlignedBox3d | MeshBounds | ||
| FColor | NormalSegmentColor | Variables for drawing. | |
| OnCollisionGeometryChangedEvent | OnCollisionGeometryChanged | ||
| OnSelectionChangedEvent | OnSelectionChanged | ||
| TSharedPtr< FPhysicsDataCollection > | PhysicsData | ||
| TSet< int32 > | PreDragSelection | ||
| FColor | PreHoverPrimitiveColor | Cache previous color while temporarily changing the color of a hovered-over curve. | |
| TObjectPtr< UPreviewGeometry > | PreviewGeometry | Used for displaying Primitives/segments | |
| TSharedPtr< FKAggregateGeom > | PrimitivePreTransform | ||
| TArray< FPrimitiveRenderData > | PrimitiveRenderData | ||
| TMap< int32, TArray< int32 > > | PrimitiveToCurveLookup | ||
| float | SegmentsThickness | ||
| FColor | SelectedColor | ||
| TSet< int32 > | SelectedPrimitiveIDs | ||
| TFunction< bool(void)> | ShouldAddToSelectionFunc | Default modifier key behavior is consistent with PolygonSelectionMechanic. | |
| FShouldHideGizmo | ShouldHideGizmo | ||
| TFunction< bool(void)> | ShouldRemoveFromSelectionFunc | ||
| TObjectPtr< UCombinedTransformGizmo > | SphereTransformGizmo | ||
| TObjectPtr< UTransformProxy > | SphereTransformProxy | ||
| TObjectPtr< UCombinedTransformGizmo > | TranslateTransformGizmo | ||
| TObjectPtr< UTransformProxy > | TranslateTransformProxy | Support for gizmos. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddBox () |
||
| void | AddCapsule () |
||
| void | AddSphere () |
||
| void | ClearHover () |
||
| void | |||
| void | |||
| bool | DeselectPrimitive
(
int32 PrimitiveID |
||
| void | DrawHUD
(
FCanvas* Canvas, |
||
| void | |||
| void | GizmoTransformChanged
(
UTransformProxy* Proxy, |
Callbacks we'll receive from the gizmo proxy. | |
| void | GizmoTransformEnded
(
UTransformProxy* Proxy |
||
| void | GizmoTransformStarted
(
UTransformProxy* Proxy |
||
| bool | HitTest
(
const FInputDeviceRay& ClickPos, |
All of the following do not issue undo/redo change objects. | |
| void | Initialize
(
TSharedPtr< FPhysicsDataCollection >, |
||
| void | OnDragRectangleChanged
(
const FCameraRectangle& Rectangle |
||
| void | OnDragRectangleFinished
(
const FCameraRectangle& Rectangle, |
||
| void | |||
| void | RebuildDrawables
(
bool bRegenerateCurveLists |
||
| void | SelectPrimitive
(
int32 PrimitiveID |
||
| void | |||
| void | UpdateCollisionGeometry
(
const FKAggregateGeom& NewGeometryIn |
||
| void | |||
| void | |||
| void |
Overridden from UInteractionMechanic
| Type | Name | Description | |
|---|---|---|---|
| void | Render
(
IToolsContextRenderAPI* RenderAPI |
Allow the Mechanic to do any custom drawing (ie via PDI/RHI) | |
| void | Setup
(
UInteractiveTool* ParentTool |
UInteractionMechanic. | |
| void | Shutdown () |
Called to clean up the InteractionMechanic |
Overridden from IClickBehaviorTarget
| Type | Name | Description | |
|---|---|---|---|
| FInputRayHit | IsHitByClick
(
const FInputDeviceRay& ClickPos |
IClickBehaviorTarget implementation. | |
| void | OnClicked
(
const FInputDeviceRay& ClickPos |
Notify Target that click ocurred |
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 implementation. | |
| 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 |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FCollisionPrimitivesMechanicGeometryChange | Primitives have moved/changed. | ||
| FCollisionPrimitivesMechanicSelectionChange | Primitive selection has changed. | ||
| FPrimitiveRenderData |
Typedefs
| Name | Description |
|---|---|
| FShouldHideGizmo | |
| FVector2i | |
| OnCollisionGeometryChangedEvent | This delegate is called every time the collision geometry is changed or moved. |
| OnSelectionChangedEvent | This delegate is called every time the collision geometry selection changes. |
Constants
| Name | Description |
|---|---|
| CtrlModifierID | |
| ShiftModifierID |