Skip to content

Commit

Permalink
Fix visibility of function and types
Browse files Browse the repository at this point in the history
  • Loading branch information
splashdust committed Apr 3, 2024
1 parent 7c39265 commit fc66f9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/voxel_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl<'w, C: VoxelWorldConfig> VoxelWorld<'w, C> {
}
}

trait FilterFn {
pub trait FilterFn {
fn call(&self, input: (Vec3, WorldVoxel)) -> bool;
}

Expand All @@ -178,7 +178,7 @@ impl<F: Fn((Vec3, WorldVoxel)) -> bool> FilterFn for F {
}
}

type RaycastFn = dyn Fn(Ray3d, &dyn FilterFn) -> Option<VoxelRaycastResult> + Send + Sync;
pub type RaycastFn = dyn Fn(Ray3d, &dyn FilterFn) -> Option<VoxelRaycastResult> + Send + Sync;

#[derive(Default, Debug, PartialEq, Clone)]
pub struct VoxelRaycastResult {
Expand Down Expand Up @@ -254,7 +254,7 @@ impl<'w, C: VoxelWorldConfig> VoxelWorldRaycast<'w, C> {
}

/// Get a sendable closure that can be used to raycast into the voxel world
fn raycast_fn(&self) -> Arc<RaycastFn> {
pub fn raycast_fn(&self) -> Arc<RaycastFn> {
let chunk_map = self.chunk_map.get_map();
let spawning_distance = self.configuration.spawning_distance() as i32;
let get_voxel = self.voxel_world.get_voxel_fn();
Expand Down

0 comments on commit fc66f9b

Please sign in to comment.