Struct rust_raylib::model::Model
source · pub struct Model { /* private fields */ }
Expand description
Model, meshes, materials and animation data
Implementations§
source§impl Model
impl Model
sourcepub fn set_transform(&mut self, mat: Matrix)
pub fn set_transform(&mut self, mat: Matrix)
Local transform matrix
sourcepub fn meshes(&self) -> &[ManuallyDrop<Mesh>]
pub fn meshes(&self) -> &[ManuallyDrop<Mesh>]
Meshes array
sourcepub fn meshes_mut(&mut self) -> &mut [ManuallyDrop<Mesh>]
pub fn meshes_mut(&mut self) -> &mut [ManuallyDrop<Mesh>]
Meshes array
sourcepub fn materials(&self) -> &[ManuallyDrop<Material>]
pub fn materials(&self) -> &[ManuallyDrop<Material>]
Materials array
sourcepub fn materials_mut(&mut self) -> &mut [ManuallyDrop<Material>]
pub fn materials_mut(&mut self) -> &mut [ManuallyDrop<Material>]
Materials array
sourcepub fn bind_pose_mut(&mut self) -> &mut [Transform]
pub fn bind_pose_mut(&mut self) -> &mut [Transform]
Bones base transformation (pose)
sourcepub fn get_bounding_box(&self) -> BoundingBox
pub fn get_bounding_box(&self) -> BoundingBox
Compute model bounding box limits (considers all meshes)
sourcepub fn set_mesh_material(&mut self, mesh_id: u32, material_id: u32)
pub fn set_mesh_material(&mut self, mesh_id: u32, material_id: u32)
Set material for a mesh
sourcepub fn update_animation(&self, anim: &ModelAnimation, frame: u32)
pub fn update_animation(&self, anim: &ModelAnimation, frame: u32)
Update model animation pose
sourcepub fn is_animation_valid(&self, anim: &ModelAnimation) -> bool
pub fn is_animation_valid(&self, anim: &ModelAnimation) -> bool
Check model animation skeleton match
sourcepub fn as_raw(&self) -> &Model
pub fn as_raw(&self) -> &Model
Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original
sourcepub fn as_raw_mut(&mut self) -> &mut Model
pub fn as_raw_mut(&mut self) -> &mut Model
Get the ‘raw’ ffi type Take caution when cloning so it doesn’t outlive the original
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Model
impl !Send for Model
impl !Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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