fn add_outer_shell(
    pos: AxialPoint,
    pillar: &HexPillar,
    vertices: &mut Vec<Vertex>,
    indices: &mut Vec<u32>,
) {
    let neighbors = [
        EdgeDir::TopLeft,
        EdgeDir::TopRight,
        EdgeDir::Right,
        EdgeDir::BottomRight,
        EdgeDir::BottomLeft,
        EdgeDir::Left,
    ];

    for &neighbor in &neighbors {
        // Check if this neighbor is outside of the current chunk. If yes, we
        // need to add sides, otherwise we skip it.
        let neighbor_pos = pos + neighbor.axial_vec();
        let is_outer = neighbor_pos.q >= CHUNK_SIZE.into()
            || neighbor_pos.r >= CHUNK_SIZE.into()
            || neighbor_pos.q < 0
            || neighbor_pos.r < 0;

        if is_outer {
            for sec in pillar.sections() {
                add_side(
                    sec.bottom, sec.top, sec.ground, false, neighbor, pos, vertices, indices,
                );
            }
        }
    }
}
/// If the given pillar is on the outer edge of the chunk, this function adds
/// faces to cover those sides.
If the given pillar is on the outer edge of the chunk, this function adds
faces to cover those sides.
If the given pillar is on the outer edge of the chunk this function adds faces to cover those sides .
fn add_outer_shell(
    pos: AxialPoint,
    pillar: &HexPillar,
    vertices: &mut Vec<Vertex>,
    indices: &mut Vec<u32>,
) {
    let neighbors = [
        EdgeDir::TopLeft,
        EdgeDir::TopRight,
        EdgeDir::Right,
        EdgeDir::BottomRight,
        EdgeDir::BottomLeft,
        EdgeDir::Left,
    ];
    for &neighbor in &neighbors {
        // Check if this neighbor is outside of the current chunk. If yes, we
        // need to add sides, otherwise we skip it.
        let neighbor_pos = pos + neighbor.axial_vec();
        let is_outer = neighbor_pos.q >= CHUNK_SIZE.into()
            || neighbor_pos.r >= CHUNK_SIZE.into()
            || neighbor_pos.q < 0
            || neighbor_pos.r < 0;
        if is_outer {
            for sec in pillar.sections() {
                add_side(
                    sec.bottom, sec.top, sec.ground, false, neighbor, pos, vertices, indices,
                );
            }
        }
    }
}
fn add_outer_shell ( pos : AxialPoint , pillar : & HexPillar , vertices : & mut Vec < Vertex > , indices : & mut Vec < u32 > , ) { let neighbors = [ EdgeDir :: TopLeft , EdgeDir :: TopRight , EdgeDir :: Right , EdgeDir :: BottomRight , EdgeDir :: BottomLeft , EdgeDir :: Left , ] ; for & neighbor in & neighbors { // Check if this neighbor is outside of the current chunk. If yes, we // need to add sides, otherwise we skip it. let neighbor_pos = pos + neighbor . axial_vec ( ) ; let is_outer = neighbor_pos . q >= CHUNK_SIZE . into ( ) || neighbor_pos . r >= CHUNK_SIZE . into ( ) || neighbor_pos . q < 0 || neighbor_pos . r < 0 ; if is_outer { for sec in pillar . sections ( ) { add_side ( sec . bottom , sec . top , sec . ground , false , neighbor , pos , vertices , indices , ) ; } } } }
If the given pillar is on the outer edge of the chunk, this function adds
faces to cover those sides.
If the given pillar is on the outer edge of the chunk this function adds faces to cover those sides .
pos
AxialPoint
pillar
&HexPillar
vertices
&mut Vec<Vertex>
indices
&mut Vec<u32>