Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Spatial > API/Runtime/GeometryCore/Spatial/TMeshAABBTree3 > API/Runtime/GeometryCore/Spatial/TMeshAABBTree3/FindNearestHitTriangle
- IMeshSpatial::FindNearestHitTriangle()
- TMeshAABBTree3::FindNearestHitTriangle()
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Spatial/MeshAABBTree3.h |
| Include | #include "Spatial/MeshAABBTree3.h" |
virtual bool FindNearestHitTriangle
(
const FRay3d & Ray,
double & NearestT,
int & TID,
FVector3d & BaryCoords,
const FQueryOptions & Options
) const
Remarks
Find nearest triangle from the given ray true if hit, false if no hit found
Parameters
| Name | Description |
|---|---|
| Ray | query ray |
| NearestT | returned-by-reference parameter of the nearest hit |
| TID | returned-by-reference ID of triangle intersected by ray within MaxDistance, or InvalidID if not found |
| BaryCoords | returned-by-reference Barycentric coordinates of the triangle intersected by ray within MaxDistance, or FVector3d::Zero if not found. |
| Options | Query options (ex. max distance) |