Navigation
API > API/Plugins > API/Plugins/ModelingComponents > API/Plugins/ModelingComponents/Mechanics
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractionMechanic
- UPlaneDistanceFromHitMechanic
References
Module | ModelingComponents |
Header | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/PlaneDistanceFromHitMechanic.h |
Include | #include "Mechanics/PlaneDistanceFromHitMechanic.h" |
Syntax
UCLASS&40;&41;
class UPlaneDistanceFromHitMechanic : public UInteractionMechanic
Remarks
UPlaneDistanceFromHitMechanic implements an interaction where a Height/Distance from a plane is defined by intersecting a ray with a target mesh, and then using that hit point to define the distance. Optionally the hit point can be snapped (eg to a world grid), and also the ray can hit other objects to define the height.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
bool | bCurrentHitIsWorldHit | True if the current hit/height was determined via WorldHitQueryFunc result |
![]() |
bool | bFallbackToLineAxisPoint | If true, then if we don't find any intersection point, just use nearest point on plane normal to ray |
![]() |
float | CurrentHeight | Height at last hit point |
![]() |
UE::Geometry::FFrame3d | CurrentHitPosFrameWorld | World frame at last hit point |
![]() |
FHitResult | LastActiveWorldHit | Last active hit point |
![]() |
FFrame3d | PreviewHeightFrame | |
![]() |
UE::Geometry::FDynamicMesh3 | PreviewHeightTarget | |
![]() |
UE::Geometry::FDynamicMeshAABBTree3 | PreviewHeightTargetAABB | |
![]() |
TUniqueFunction< bool(const FRay &, FHitResult &)> | WorldHitQueryFunc | If this function is set, we will check it for a ray intersection if the target mesh is not hit |
![]() |
TUniqueFunction< bool(const FVector3d &, FVector3d &)> | WorldPointSnapFunc | If this function is set, the hit point will be passed in to this function for snapping. |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
const FFrame3d & | GetPlane () |
|
![]() ![]() |
void | Initialize
(
UE::Geometry::FDynamicMesh3&& HitTargetMesh, |
Set the hit target mesh and the plane frame. |
![]() ![]() |
void | Initialize
(
UE::Geometry::FDynamicMesh3&& HitTargetMesh, |
Set the hit target mesh and the plane frame. |
![]() ![]() |
void | UpdateCurrentDistance
(
const FRay& WorldRay |
Update the current distance/height based on the input world ray |
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 |
Called to initialize the InteractionMechanic |
Typedefs
Name | Description |
---|---|
FFrame3d |