Struct CubeListBuilder
pub struct CubeListBuilder { /* private fields */ }Expand description
CubeListBuilder: the boxes of one part, each placed on the texture from
the last tex_offs and mirrored after mirror.
Implementations§
§impl CubeListBuilder
impl CubeListBuilder
pub fn create() -> CubeListBuilder
pub fn create() -> CubeListBuilder
An empty box builder.
pub fn tex_offs(self, u: i32, v: i32) -> CubeListBuilder
pub fn tex_offs(self, u: i32, v: i32) -> CubeListBuilder
Where the next boxes’ faces start on the texture, in texels (texOffs).
pub fn mirror(self) -> CubeListBuilder
pub fn mirror(self) -> CubeListBuilder
The next boxes are mirrored (mirror()).
pub fn set_mirror(self, mirror: bool) -> CubeListBuilder
pub fn set_mirror(self, mirror: bool) -> CubeListBuilder
Whether the next boxes are mirrored (mirror(boolean)).
pub fn add_box(self, origin: [f32; 3], size: [f32; 3]) -> CubeListBuilder
pub fn add_box(self, origin: [f32; 3], size: [f32; 3]) -> CubeListBuilder
A box at origin of size texels (addBox(x, y, z, w, h, d)).
pub fn add_box_with(
self,
origin: [f32; 3],
size: [f32; 3],
grow: CubeDeformation,
) -> CubeListBuilder
pub fn add_box_with( self, origin: [f32; 3], size: [f32; 3], grow: CubeDeformation, ) -> CubeListBuilder
A box grown by grow (addBox(x, y, z, w, h, d, deformation)).
pub fn add_box_mirrored(
self,
origin: [f32; 3],
size: [f32; 3],
mirror: bool,
) -> CubeListBuilder
pub fn add_box_mirrored( self, origin: [f32; 3], size: [f32; 3], mirror: bool, ) -> CubeListBuilder
A box mirrored or not by mirror, whatever mirror() said
(addBox(x, y, z, w, h, d, mirror)).
pub fn add_box_faces(
self,
origin: [f32; 3],
size: [f32; 3],
faces: &[Direction],
) -> CubeListBuilder
pub fn add_box_faces( self, origin: [f32; 3], size: [f32; 3], faces: &[Direction], ) -> CubeListBuilder
A box with only faces (addBox(x, y, z, w, h, d, visibleFaces)).
pub fn add_box_tex_scaled(
self,
origin: [f32; 3],
size: [f32; 3],
grow: CubeDeformation,
tex_scale: [f32; 2],
) -> CubeListBuilder
pub fn add_box_tex_scaled( self, origin: [f32; 3], size: [f32; 3], grow: CubeDeformation, tex_scale: [f32; 2], ) -> CubeListBuilder
A box whose texels take tex_scale of the texture’s
(addBox(x, y, z, w, h, d, deformation, texScaleU, texScaleV)).
pub fn add_box_at(
self,
origin: [f32; 3],
size: [f32; 3],
grow: CubeDeformation,
tex: [i32; 2],
) -> CubeListBuilder
pub fn add_box_at( self, origin: [f32; 3], size: [f32; 3], grow: CubeDeformation, tex: [i32; 2], ) -> CubeListBuilder
A box with its own place on the texture, leaving tex_offs as it is
(addBox(comment, x, y, z, w, h, d, deformation, texU, texV)).
pub fn cubes(&self) -> &[CubeDefinition]
pub fn cubes(&self) -> &[CubeDefinition]
The boxes added so far (getCubes).
Trait Implementations§
§impl Clone for CubeListBuilder
impl Clone for CubeListBuilder
§fn clone(&self) -> CubeListBuilder
fn clone(&self) -> CubeListBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more