Mesh

Struct Mesh 

Source
pub struct Mesh(/* private fields */);

Implementations§

Source§

impl Mesh

Source

pub unsafe fn unwrap(self) -> Mesh

Take the raw ffi type. Must manually free memory by calling the proper unload function

Source§

impl Mesh

Source

pub fn to_raw(self) -> Mesh

returns the unwrapped raylib-sys object

Source

pub unsafe fn from_raw(raw: Mesh) -> Mesh

converts raylib-sys object to a “safe” version. Make sure to call this function from the thread the resource was created.

Source§

impl Mesh

Source

pub unsafe fn make_weak(self) -> WeakMesh

Trait Implementations§

Source§

impl AsMut<Mesh> for Mesh

Source§

fn as_mut(&mut self) -> &mut Mesh

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Mesh> for Mesh

Source§

fn as_ref(&self) -> &Mesh

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Debug for Mesh

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for Mesh

Source§

type Target = Mesh

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Mesh as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for Mesh

Source§

fn deref_mut(&mut self) -> &mut <Mesh as Deref>::Target

Mutably dereferences the value.
Source§

impl Drop for Mesh

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl RaylibMesh for Mesh

Source§

fn vertices(&self) -> &[Vector3]

Source§

fn vertices_mut(&mut self) -> &mut [Vector3]

Source§

fn normals(&self) -> &[Vector3]

Source§

fn normals_mut(&mut self) -> &mut [Vector3]

Source§

fn tangents(&self) -> &[Vector3]

Source§

fn tangents_mut(&mut self) -> &mut [Vector3]

Source§

fn colors(&self) -> &[Color]

Source§

fn colors_mut(&mut self) -> &mut [Color]

Source§

fn indicies(&self) -> &[u16]

Source§

fn indicies_mut(&mut self) -> &mut [u16]

Source§

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

Generates plane mesh (with subdivisions).
Source§

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

Generates sphere mesh (standard sphere).
Source§

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

Generates cylinder mesh.
Source§

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

Generates trefoil knot mesh.
Source§

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

Generates cubes-based map mesh from image data.
Source§

fn mesh_bounding_box(&self) -> BoundingBox

Computes mesh bounding box limits.
Source§

fn mesh_tangents(&mut self, _: &RaylibThread)

Computes mesh tangents.
Source§

fn mesh_binormals(&mut self)

Computes mesh binormals.
Source§

fn export_mesh(&self, filename: &str)

Exports mesh as an OBJ file.

Auto Trait Implementations§

§

impl Freeze for Mesh

§

impl RefUnwindSafe for Mesh

§

impl !Send for Mesh

§

impl !Sync for Mesh

§

impl Unpin for Mesh

§

impl UnwindSafe for Mesh

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.