(&self, coord: &Vector3<R>)
| 442 | /// return negative indices or indices larger than the number of cells per dimension. |
| 443 | #[inline(always)] |
| 444 | pub fn enclosing_cell(&self, coord: &Vector3<R>) -> [I; 3] { |
| 445 | let normalized_coord = (coord - self.aabb.min()) / self.cell_size; |
| 446 | [ |
| 447 | normalized_coord[0].floor().to_index_unchecked(), |
| 448 | normalized_coord[1].floor().to_index_unchecked(), |
| 449 | normalized_coord[2].floor().to_index_unchecked(), |
| 450 | ] |
| 451 | } |
| 452 | |
| 453 | /// Returns an AABB of the given cell |
| 454 | #[inline(always)] |
no test coverage detected