pub fn intersect_world<BC: BlockContainer>(&self, world: &BC) -> bool {
        let min_x = self.pos.x.floor() as i64;
        let max_x = (self.pos.x + self.size_x).ceil() as i64;
        let min_y = self.pos.y.floor() as i64;
        let max_y = (self.pos.y + self.size_y).ceil() as i64;
        let min_z = self.pos.z.floor() as i64;
        let max_z = (self.pos.z + self.size_z).ceil() as i64;

        for i in min_x..max_x {
            for j in min_y..max_y {
                for k in min_z..max_z {
                    if world.is_block_full((i, j, k).into()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
/// Return true if the box intersect some block
Return true if the box intersect some block
Return true if the box intersect some block
pub fn intersect_world<BC: BlockContainer>(&self, world: &BC) -> bool {
        let min_x = self.pos.x.floor() as i64;
        let max_x = (self.pos.x + self.size_x).ceil() as i64;
        let min_y = self.pos.y.floor() as i64;
        let max_y = (self.pos.y + self.size_y).ceil() as i64;
        let min_z = self.pos.z.floor() as i64;
        let max_z = (self.pos.z + self.size_z).ceil() as i64;
        for i in min_x..max_x {
            for j in min_y..max_y {
                for k in min_z..max_z {
                    if world.is_block_full((i, j, k).into()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
pub fn intersect_world < BC : BlockContainer > ( & self , world : & BC ) -> bool { let min_x = self . pos . x . floor ( ) as i64 ; let max_x = ( self . pos . x + self . size_x ) . ceil ( ) as i64 ; let min_y = self . pos . y . floor ( ) as i64 ; let max_y = ( self . pos . y + self . size_y ) . ceil ( ) as i64 ; let min_z = self . pos . z . floor ( ) as i64 ; let max_z = ( self . pos . z + self . size_z ) . ceil ( ) as i64 ; for i in min_x .. max_x { for j in min_y .. max_y { for k in min_z .. max_z { if world . is_block_full ( ( i , j , k ) . into ( ) ) { return true ; } } } } return false ; }
Return true if the box intersect some block
Return true if the box intersect some block
&self
world
&BC
&self
world
&BC