Skip to content

Commit

Permalink
Remove unused CollisionSpace::get_voxels().
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Feb 17, 2024
1 parent bc09779 commit e26c2eb
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions all-is-cubes/src/physics/collision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,6 @@ pub(crate) trait CollisionSpace {
/// If None, recursion is needed.
fn collision(cell: &Self::Cell) -> Option<BlockCollision>;

/// TODO: document
fn get_voxels(cell: &Self::Cell) -> Option<&Evoxels>;

/// Recursion helper for [`collide_along_ray()`].
/// This breaks the infinite static recursion we would get otherwise,
/// by only compiling into a call to [`collide_along_ray()`] if there is anything to do.
Expand Down Expand Up @@ -555,11 +552,6 @@ impl CollisionSpace for Space {
cell.uniform_collision
}

#[inline]
fn get_voxels(evaluated: &EvaluatedBlock) -> Option<&Evoxels> {
Some(&evaluated.voxels)
}

#[inline]
fn recurse(
cube: Cube,
Expand Down Expand Up @@ -636,13 +628,6 @@ impl CollisionSpace for Vol<Arc<[Evoxel]>> {
Some(cell.collision)
}

#[inline]
fn get_voxels(_cell: &Self::Cell) -> Option<&Evoxels> {
// TODO: can't just return Evoxels::One because it would have to be owned (unless we
// changed the return type to Cow or used a different enum), but that might be
// elegant (or not)...revisit.
None
}
#[inline(always)]
fn recurse(
_cube: Cube,
Expand Down

0 comments on commit e26c2eb

Please sign in to comment.