pub struct Mesh(/* private fields */);Implementations§
Trait Implementations§
Source§impl RaylibMesh for Mesh
impl RaylibMesh for Mesh
unsafe fn upload(&mut self, dynamic: bool)
unsafe fn update_buffer<A>(&mut self, index: i32, data: &[u8], offset: i32)
fn vertices(&self) -> &[Vector3]
fn vertices_mut(&mut self) -> &mut [Vector3]
fn normals(&self) -> &[Vector3]
fn normals_mut(&mut self) -> &mut [Vector3]
fn tangents(&self) -> &[Vector3]
fn tangents_mut(&mut self) -> &mut [Vector3]
fn colors(&self) -> &[Color]
fn colors_mut(&mut self) -> &mut [Color]
fn indicies(&self) -> &[u16]
fn indicies_mut(&mut self) -> &mut [u16]
Source§fn gen_mesh_poly(_: &RaylibThread, sides: i32, radius: f32) -> Mesh
fn gen_mesh_poly(_: &RaylibThread, sides: i32, radius: f32) -> Mesh
Generate polygonal mesh
Source§fn gen_mesh_plane(
_: &RaylibThread,
width: f32,
length: f32,
res_x: i32,
res_z: i32,
) -> Mesh
fn gen_mesh_plane( _: &RaylibThread, width: f32, length: f32, res_x: i32, res_z: i32, ) -> Mesh
Generates plane mesh (with subdivisions).
Source§fn gen_mesh_cube(_: &RaylibThread, width: f32, height: f32, length: f32) -> Mesh
fn gen_mesh_cube(_: &RaylibThread, width: f32, height: f32, length: f32) -> Mesh
Generates cuboid mesh.
Source§fn gen_mesh_sphere(
_: &RaylibThread,
radius: f32,
rings: i32,
slices: i32,
) -> Mesh
fn gen_mesh_sphere( _: &RaylibThread, radius: f32, rings: i32, slices: i32, ) -> Mesh
Generates sphere mesh (standard sphere).
Source§fn gen_mesh_hemisphere(
_: &RaylibThread,
radius: f32,
rings: i32,
slices: i32,
) -> Mesh
fn gen_mesh_hemisphere( _: &RaylibThread, radius: f32, rings: i32, slices: i32, ) -> Mesh
Generates half-sphere mesh (no bottom cap).
Source§fn gen_mesh_cylinder(
_: &RaylibThread,
radius: f32,
height: f32,
slices: i32,
) -> Mesh
fn gen_mesh_cylinder( _: &RaylibThread, radius: f32, height: f32, slices: i32, ) -> Mesh
Generates cylinder mesh.
Source§fn gen_mesh_torus(
_: &RaylibThread,
radius: f32,
size: f32,
rad_seg: i32,
sides: i32,
) -> Mesh
fn gen_mesh_torus( _: &RaylibThread, radius: f32, size: f32, rad_seg: i32, sides: i32, ) -> Mesh
Generates torus mesh.
Source§fn gen_mesh_knot(
_: &RaylibThread,
radius: f32,
size: f32,
rad_seg: i32,
sides: i32,
) -> Mesh
fn gen_mesh_knot( _: &RaylibThread, radius: f32, size: f32, rad_seg: i32, sides: i32, ) -> Mesh
Generates trefoil knot mesh.
Source§fn gen_mesh_heightmap(
_: &RaylibThread,
heightmap: &Image,
size: impl Into<Vector3>,
) -> Mesh
fn gen_mesh_heightmap( _: &RaylibThread, heightmap: &Image, size: impl Into<Vector3>, ) -> Mesh
Generates heightmap mesh from image data.
Source§fn gen_mesh_cubicmap(
_: &RaylibThread,
cubicmap: &Image,
cube_size: impl Into<Vector3>,
) -> Mesh
fn gen_mesh_cubicmap( _: &RaylibThread, cubicmap: &Image, cube_size: impl Into<Vector3>, ) -> Mesh
Generates cubes-based map mesh from image data.
Source§fn gen_mesh_cone(
_: &RaylibThread,
radius: f32,
height: f32,
slices: i32,
) -> Mesh
fn gen_mesh_cone( _: &RaylibThread, radius: f32, height: f32, slices: i32, ) -> Mesh
Generate cone/pyramid mesh
Source§fn get_mesh_bounding_box(&self) -> BoundingBox
fn get_mesh_bounding_box(&self) -> BoundingBox
Computes mesh bounding box limits.
Source§fn gen_mesh_tangents(&mut self, _: &RaylibThread)
fn gen_mesh_tangents(&mut self, _: &RaylibThread)
Computes mesh tangents.
Source§fn export_as_code(&self, filename: &str)
fn export_as_code(&self, filename: &str)
Export mesh as code file (.h) defining multiple arrays of vertex attributes
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl !Send for Mesh
impl !Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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