gwnavruntime/queries/utils/diskintersector.h Source File
Go to the documentation of this file.
30 DiskIntersector(const BaseDiskExpansionQuery& query) :
31 m_integerPrecision(query.m_database->GetDatabaseGenMetrics().m_integerPrecision),
32 m_center3f(query.GetCenterPos()), m_radius(query.GetRadiusMax()) {}
34 DiskIntersector(
const BaseDiskCollisionQuery& query) :
35 m_integerPrecision(query.m_database->GetDatabaseGenMetrics().m_integerPrecision),
36 m_center3f(query.GetCenterPos()), m_radius(query.GetRadius()) {}
40 const Vec3f startEdgePos(startEdgeCoordPos.x * m_integerPrecision, startEdgeCoordPos.y * m_integerPrecision, 0.f);
41 const Vec3f endEdgePos(endEdgeCoordPos.x * m_integerPrecision, endEdgeCoordPos.y * m_integerPrecision, 0.f);
43 return Math::SegmentVsDisk2f(startEdgePos, endEdgePos, m_center3f, m_radius);
46 void ComputeCollisionPosOnEdge(
const CoordPos64& startEdgeCoordPos,
const CoordPos64& endEdgeCoordPos, Vec3f& collisionPos,
KyFloat32& squareDistToCollisionPos)
48 const Vec3f startEdgePos(startEdgeCoordPos.x * m_integerPrecision, startEdgeCoordPos.y * m_integerPrecision, 0.f);
49 const Vec3f endEdgePos(endEdgeCoordPos.x * m_integerPrecision, endEdgeCoordPos.y * m_integerPrecision, 0.f);
51 ClosestPoint::OnSegmentVsPoint2d(startEdgePos, endEdgePos, m_center3f, collisionPos, squareDistToCollisionPos);
56 const Vec3f v0(v0CoordPos.x * m_integerPrecision, v0CoordPos.y * m_integerPrecision, 0.f);
57 const Vec3f v1(v1CoordPos.x * m_integerPrecision, v1CoordPos.y * m_integerPrecision, 0.f);
58 const Vec3f v2(v2CoordPos.x * m_integerPrecision, v2CoordPos.y * m_integerPrecision, 0.f);
61 ClosestPoint::OnTriangleVsPoint2d(v0, v1, v2, m_center3f, unused, cost);
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:16
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32