Type Alias veloren_common::figure::MatSegment

source ·
pub type MatSegment = Dyna<MatCell, ()>;

Aliased Type§

struct MatSegment {
    vox: Vec<MatCell>,
    meta: (),
    pub sz: Vec3<u32>,
    _phantom: PhantomData<ColumnAccess>,
}

Fields§

§vox: Vec<MatCell>§meta: ()§sz: Vec3<u32>§_phantom: PhantomData<ColumnAccess>

Implementations§

source§

impl MatSegment

source

pub fn to_segment(&self, map: impl Fn(Material) -> Rgb<u8>) -> Segment

source

pub fn map(self, transform: impl Fn(MatCell) -> Option<MatCell>) -> Self

Transform cells

source

pub fn map_rgb(self, transform: impl Fn(Rgb<u8>) -> Rgb<u8>) -> Self

Transform cell colors

source

pub fn from_vox_model_index( dot_vox_data: &DotVoxData, model_index: usize ) -> Self

source

pub fn from_vox( dot_vox_data: &DotVoxData, flipped: bool, model_index: usize ) -> Self