MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / overlap_point

Method overlap_point

native/shared/src/physics_jolt.rs:675–686  ·  view source on GitHub ↗
(&mut self, world_h: f64, px: f32, py: f32, pz: f32, layer_mask: u32, max_results: u32)

Source from the content-addressed store, hash-verified

673 }
674
675 pub fn overlap_point(&mut self, world_h: f64, px: f32, py: f32, pz: f32, layer_mask: u32, max_results: u32) -> u32 {
676 self.overlap_cache.bodies.clear();
677 let world = match self.worlds.get(world_h) { Some(&w) => w, None => return 0 };
678 self.overlap_cache.bodies.resize(max_results as usize, BJ_INVALID);
679 let n = unsafe {
680 bj_query_overlap_point(world,
681 BjVec3 { x: px, y: py, z: pz }, layer_mask,
682 self.overlap_cache.bodies.as_mut_ptr(), max_results)
683 };
684 self.overlap_cache.bodies.truncate(n as usize);
685 n
686 }
687
688 #[allow(clippy::too_many_arguments)]
689 pub fn overlap_box(

Callers

nothing calls this directly

Calls 3

clearMethod · 0.45
getMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected