MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetCellKey

Method GetCellKey

TombEngine/Specific/Structures/SpatialHash.cpp:232–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 }
231
232 Vector3i SpatialHash::GetCellKey(const Vector3& pos) const
233 {
234 // Calculate and return key.
235 return Vector3i(
236 RoundToStep(pos.x, _cellSize) + (_cellSize / 2),
237 RoundToStep(pos.y, _cellSize) + (_cellSize / 2),
238 RoundToStep(pos.z, _cellSize) + (_cellSize / 2));
239 }
240
241 std::vector<Vector3i> SpatialHash::GetCellKeys(const Ray& ray, float dist) const
242 {

Callers

nothing calls this directly

Calls 2

RoundToStepFunction · 0.85
Vector3iClass · 0.50

Tested by

no test coverage detected