pub trait RaylibMesh: AsRef<Mesh> + AsMut<Mesh> {
Show 24 methods
// Provided methods
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] { ... }
fn gen_mesh_poly(_: &RaylibThread, sides: i32, radius: f32) -> Mesh { ... }
fn gen_mesh_plane(
_: &RaylibThread,
width: f32,
length: f32,
res_x: i32,
res_z: i32,
) -> Mesh { ... }
fn gen_mesh_cube(
_: &RaylibThread,
width: f32,
height: f32,
length: f32,
) -> Mesh { ... }
fn gen_mesh_sphere(
_: &RaylibThread,
radius: f32,
rings: i32,
slices: i32,
) -> Mesh { ... }
fn gen_mesh_hemisphere(
_: &RaylibThread,
radius: f32,
rings: i32,
slices: i32,
) -> Mesh { ... }
fn gen_mesh_cylinder(
_: &RaylibThread,
radius: f32,
height: f32,
slices: i32,
) -> Mesh { ... }
fn gen_mesh_torus(
_: &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 { ... }
fn gen_mesh_heightmap(
_: &RaylibThread,
heightmap: &Image,
size: impl Into<Vector3>,
) -> Mesh { ... }
fn gen_mesh_cubicmap(
_: &RaylibThread,
cubicmap: &Image,
cube_size: impl Into<Vector3>,
) -> Mesh { ... }
fn mesh_bounding_box(&self) -> BoundingBox { ... }
fn mesh_tangents(&mut self, _: &RaylibThread) { ... }
fn mesh_binormals(&mut self) { ... }
fn export_mesh(&self, filename: &str) { ... }
}Provided Methods§
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]
Sourcefn gen_mesh_poly(_: &RaylibThread, sides: i32, radius: f32) -> Mesh
fn gen_mesh_poly(_: &RaylibThread, sides: i32, radius: f32) -> Mesh
Generate polygonal mesh
Sourcefn 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).
Sourcefn 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.
Sourcefn 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).
Sourcefn 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).
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn mesh_bounding_box(&self) -> BoundingBox
fn mesh_bounding_box(&self) -> BoundingBox
Computes mesh bounding box limits.
Sourcefn mesh_tangents(&mut self, _: &RaylibThread)
fn mesh_tangents(&mut self, _: &RaylibThread)
Computes mesh tangents.
Sourcefn mesh_binormals(&mut self)
fn mesh_binormals(&mut self)
Computes mesh binormals.
Sourcefn export_mesh(&self, filename: &str)
fn export_mesh(&self, filename: &str)
Exports mesh as an OBJ file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.