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
Note that calling ManuallyDrop::drop on the returned values is a very very bad idea.
sourcepub fn meshes_mut(&mut self) -> &mut [ManuallyDrop<Mesh>]
pub fn meshes_mut(&mut self) -> &mut [ManuallyDrop<Mesh>]
Meshes array
Note that calling ManuallyDrop::drop on the returned values is a very very bad idea.
sourcepub fn materials(&self) -> &[ManuallyDrop<Material>]
pub fn materials(&self) -> &[ManuallyDrop<Material>]
Materials array
Note that calling ManuallyDrop::drop on the returned values is a very very bad idea.
sourcepub fn materials_mut(&mut self) -> &mut [ManuallyDrop<Material>]
pub fn materials_mut(&mut self) -> &mut [ManuallyDrop<Material>]
Materials array
Note that calling ManuallyDrop::drop on the returned values is a very very bad idea.
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