MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / raycast

Method raycast

Source/ThirdParty/recastnavigation/DetourNavMeshQuery.cpp:2437–2454  ·  view source on GitHub ↗

@par This method is meant to be used for quick, short distance checks. If the path array is too small to hold the result, it will be filled as far as possible from the start postion toward the end position. Using the Hit Parameter (t) If the hit parameter is a very high value (FLT_MAX), then the ray has hit the end position. In this case the path represents a valid corridor to the end p

Source from the content-addressed store, hash-verified

2435/// this method is meant for short distance checks.
2436///
2437dtStatus dtNavMeshQuery::raycast(dtPolyRef startRef, const float* startPos, const float* endPos,
2438 const dtQueryFilter* filter,
2439 float* t, float* hitNormal, dtPolyRef* path, int* pathCount, const int maxPath) const
2440{
2441 dtRaycastHit hit;
2442 hit.path = path;
2443 hit.maxPath = maxPath;
2444
2445 dtStatus status = raycast(startRef, startPos, endPos, filter, 0, &hit);
2446
2447 *t = hit.t;
2448 if (hitNormal)
2449 dtVcopy(hitNormal, hit.hitNormal);
2450 if (pathCount)
2451 *pathCount = hit.pathCount;
2452
2453 return status;
2454}
2455
2456
2457/// @par

Callers 5

RayCastMethod · 0.45
RayCastMethod · 0.45
RayCastAllMethod · 0.45

Calls 14

dtVcopyFunction · 0.85
dtVisfiniteFunction · 0.85
dtVsubFunction · 0.85
dtVsetFunction · 0.85
dtIntersectSegmentPoly2DFunction · 0.85
dtSwapFunction · 0.85
dtVmadFunction · 0.85
dtSqrFunction · 0.85
dtVnormalizeFunction · 0.85
getCostMethod · 0.80
passFilterMethod · 0.80

Tested by

no test coverage detected