Skip to main content

Source3d

Trait Source3d 

Source
pub trait Source3d {
    // Required methods
    fn is_solid(&self, cell: [i32; 3]) -> bool;
    fn surface_top(&self, cell: [i32; 3], wx: f32, wz: f32) -> Option<f32>;
}
Expand description

3D collision sampler: solidity plus the top surface height behind a cell (ramps live behind Source3d::surface_top).

Required Methods§

Source

fn is_solid(&self, cell: [i32; 3]) -> bool

Is the 3D cell solid?

Source

fn surface_top(&self, cell: [i32; 3], wx: f32, wz: f32) -> Option<f32>

Top surface height of cell at world (wx, wz), or None in air.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§