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