Navigation
API > API/Plugins > API/Plugins/DynamicMesh > API/Plugins/DynamicMesh/Sampling
References
| Module | DynamicMesh |
| Header | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Public/Sampling/MeshBakerCommon.h |
| Include | #include "Sampling/MeshBakerCommon.h" |
| Source | /Engine/Plugins/Runtime/GeometryProcessing/Source/DynamicMesh/Private/Sampling/MeshBakerCommon.cpp |
namespace UE
{
namespace Geometry
{
const void &42; UE&58;&58;Geometry&58;&58;GetDetailMeshTrianglePoint_Raycast
&40;
const IMeshBakerDetailSampler &42; DetailSpatial,
const FVector3d & BasePoint,
const FVector3d & BaseNormal,
int32 & DetailTriangleOut,
FVector3d & DetailTriBaryCoords,
double Thickness,
bool bFailToNearestPoint
&41;
}
}
Remarks
Compute base/detail mesh correspondence by raycast Find point on Detail mesh that corresponds to point on Base mesh. Strategy is: 1) cast a ray inwards along -Normal from BasePoint + Thickness*Normal 2) cast a ray outwards along Normal from BasePoint 3) cast a ray inwards along -Normal from BasePoint We take (1) preferentially, and then (2), and then (3)
If all of those fail, if bFailToNearestPoint is true we fall back to nearest-point,
If all the above fail, return nullptr a pointer to the hit mesh, otherwise nullptr.