pub struct Mesher { /* private fields */ }Expand description
The main mesher struct.
Implementations§
Source§impl Mesher
impl Mesher
Sourcepub fn new(resource_pack: ResourcePack) -> Self
pub fn new(resource_pack: ResourcePack) -> Self
Create a new mesher with default configuration.
Sourcepub fn with_config(resource_pack: ResourcePack, config: MesherConfig) -> Self
pub fn with_config(resource_pack: ResourcePack, config: MesherConfig) -> Self
Create a new mesher with custom configuration.
Sourcepub fn resource_pack(&self) -> &ResourcePack
pub fn resource_pack(&self) -> &ResourcePack
Get a reference to the resource pack.
Sourcepub fn config(&self) -> &MesherConfig
pub fn config(&self) -> &MesherConfig
Get a reference to the configuration.
Sourcepub fn mesh<S: BlockSource>(&self, source: &S) -> Result<MesherOutput>
pub fn mesh<S: BlockSource>(&self, source: &S) -> Result<MesherOutput>
Generate a mesh from a block source.
Sourcepub fn mesh_blocks<'a>(
&self,
blocks: impl Iterator<Item = (BlockPosition, &'a InputBlock)>,
bounds: BoundingBox,
) -> Result<MesherOutput>
pub fn mesh_blocks<'a>( &self, blocks: impl Iterator<Item = (BlockPosition, &'a InputBlock)>, bounds: BoundingBox, ) -> Result<MesherOutput>
Generate a mesh from an iterator of blocks.
Auto Trait Implementations§
impl Freeze for Mesher
impl RefUnwindSafe for Mesher
impl Send for Mesher
impl Sync for Mesher
impl Unpin for Mesher
impl UnwindSafe for Mesher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more