| 435 | } |
| 436 | |
| 437 | int GridMap::get_cell_item(const Vector3i &p_position) const { |
| 438 | ERR_FAIL_INDEX_V(Math::abs(p_position.x), 1 << 20, INVALID_CELL_ITEM); |
| 439 | ERR_FAIL_INDEX_V(Math::abs(p_position.y), 1 << 20, INVALID_CELL_ITEM); |
| 440 | ERR_FAIL_INDEX_V(Math::abs(p_position.z), 1 << 20, INVALID_CELL_ITEM); |
| 441 | |
| 442 | IndexKey key; |
| 443 | key.x = p_position.x; |
| 444 | key.y = p_position.y; |
| 445 | key.z = p_position.z; |
| 446 | |
| 447 | if (!cell_map.has(key)) { |
| 448 | return INVALID_CELL_ITEM; |
| 449 | } |
| 450 | return cell_map[key].item; |
| 451 | } |
| 452 | |
| 453 | int GridMap::get_cell_item_orientation(const Vector3i &p_position) const { |
| 454 | ERR_FAIL_INDEX_V(Math::abs(p_position.x), 1 << 20, -1); |
no test coverage detected