17 class AbstractGraphCellFloorIndices
20 AbstractGraphCellFloorIndices() {}
21 AbstractGraphCellFloorIndices(CompactAbstractGraphCellIdx graphCellIdx, CompactAbstractGraphFloorIdx graphFloorIdx)
22 : m_abstractCellIdx(graphCellIdx), m_abstractFloorIdx(graphFloorIdx) {}
24 CompactAbstractGraphCellIdx m_abstractCellIdx;
25 CompactAbstractGraphFloorIdx m_abstractFloorIdx;
30 SwapEndianness(e,
self.m_abstractCellIdx);
31 SwapEndianness(e,
self.m_abstractFloorIdx);
35 class AbstractGraphBlob
37 KY_ROOT_BLOB_CLASS(NavData, AbstractGraphBlob, 0)
40 bool IsCompatibleWith(const NavMeshGenParameters& genParameters) const;
44 Vec3f GetNodePosition(AbstractGraphNodeIdx graphNodeIdx, const DatabaseGenMetrics& genMetrics) const;
46 KyFloat32 GetNeighborCost(AbstractGraphNodeIdx fromGraphNodeIdx, AbstractGraphNodeIdx toGraphNodeIdx) const;
49 void GetVertexAndAltitude(AbstractGraphNodeIdx graphNodeIdx, NavVertex& graphNodeVertex,
KyFloat32& altitude) const;
52 NavMeshGenParameters m_navMeshGenParameters;
53 GuidCompound m_navMeshGuidCompound;
55 BitFieldBlob m_cellBoxCoverage;
56 BlobArray<AbstractGraphCellFloorIndices> m_graphNodeIdxToGraphCellFloorIndices;
58 BlobArray<
KyFloat32> m_neighborCostsHalfMatrixBuffer;
60 BlobArray< BlobRef<AbstractGraphCellBlob> > m_abstractCells;
63 inline
void SwapEndianness(Endianness::Target e, AbstractGraphBlob& self)
65 SwapEndianness(e,
self.m_navMeshGenParameters);
66 SwapEndianness(e,
self.m_navMeshGuidCompound);
67 SwapEndianness(e,
self.m_cellBox);
68 SwapEndianness(e,
self.m_graphNodeIdxToGraphCellFloorIndices);
69 SwapEndianness(e,
self.m_neighborCostsHalfMatrixBuffer);
70 SwapEndianness(e,
self.m_abstractCells);
75 KY_INLINE
bool AbstractGraphBlob::IsCompatibleWith(
const NavMeshGenParameters& genParameters)
const
77 return m_navMeshGenParameters == genParameters;
80 KY_INLINE
KyUInt32 AbstractGraphBlob::GetNodeCount()
const
82 return m_graphNodeIdxToGraphCellFloorIndices.GetCount();
85 KY_INLINE Vec3f AbstractGraphBlob::GetNodePosition(AbstractGraphNodeIdx graphNodeIdx,
const DatabaseGenMetrics& genMetrics)
const
87 const AbstractGraphCellFloorIndices& cellFloorIndices = m_graphNodeIdxToGraphCellFloorIndices.GetValues()[graphNodeIdx];
88 const AbstractGraphCellBlob* graphCellBlob = (m_abstractCells.GetValues()[cellFloorIndices.m_abstractCellIdx]).Ptr();
89 return graphCellBlob->GetPosition(graphNodeIdx, cellFloorIndices.m_abstractFloorIdx, genMetrics);
Box2i CellBox
A type that represents a bounding box around cells in a 2D grid.
Definition: navmeshtypes.h:31
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32