Skip to main content

RaylibModel

Trait RaylibModel 

Source
pub trait RaylibModel: AsRef<Model> + AsMut<Model> {
Show 14 methods // Provided methods fn transform(&self) -> &Matrix { ... } fn set_transform(&mut self, mat: &Matrix) { ... } fn meshes(&self) -> &[WeakMesh] { ... } fn meshes_mut(&mut self) -> &mut [WeakMesh] { ... } fn materials(&self) -> &[WeakMaterial] { ... } fn materials_mut(&mut self) -> &mut [WeakMaterial] { ... } fn bones(&self) -> Option<&[BoneInfo]> { ... } fn bones_mut(&mut self) -> Option<&mut [BoneInfo]> { ... } fn bind_pose(&self) -> Option<&Transform> { ... } fn bind_pose_mut(&mut self) -> Option<&mut Transform> { ... } fn is_model_animation_valid(&self, anim: &ModelAnimation) -> bool { ... } fn is_model_valid(&self) -> bool { ... } fn get_model_bounding_box(&self) -> BoundingBox { ... } fn set_model_mesh_material( &mut self, mesh_id: i32, material_id: i32, ) -> Result<(), Error> { ... }
}

Provided Methods§

Source

fn transform(&self) -> &Matrix

Source

fn set_transform(&mut self, mat: &Matrix)

Source

fn meshes(&self) -> &[WeakMesh]

Source

fn meshes_mut(&mut self) -> &mut [WeakMesh]

Source

fn materials(&self) -> &[WeakMaterial]

Source

fn materials_mut(&mut self) -> &mut [WeakMaterial]

Source

fn bones(&self) -> Option<&[BoneInfo]>

Source

fn bones_mut(&mut self) -> Option<&mut [BoneInfo]>

Source

fn bind_pose(&self) -> Option<&Transform>

Source

fn bind_pose_mut(&mut self) -> Option<&mut Transform>

Source

fn is_model_animation_valid(&self, anim: &ModelAnimation) -> bool

Check model animation skeleton match

Source

fn is_model_valid(&self) -> bool

Check if a model is ready

Source

fn get_model_bounding_box(&self) -> BoundingBox

Compute model bounding box limits (considers all meshes)

Source

fn set_model_mesh_material( &mut self, mesh_id: i32, material_id: i32, ) -> Result<(), Error>

Set material for a mesh

Implementors§