pub struct Model { /* private fields */ }Implementations§
source§impl Model
impl Model
pub fn from_parts(mdl: Mdl, vtx: Vtx, vvd: Vvd) -> Self
sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, ModelError>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, ModelError>
Load the model from path
Requires a path to the .mdl file and the .dx90.vtx and .vvd files for the model to be in the same directory.
pub fn vertices(&self) -> &[Vertex]
pub fn tangents(&self) -> &[[f32; 4]]
pub fn texture_directories(&self) -> &[String]
pub fn textures(&self) -> &[TextureInfo]
pub fn skin_tables(&self) -> impl Iterator<Item = SkinTable<'_>>
pub fn meshes(&self) -> impl Iterator<Item = Mesh<'_>>
sourcepub fn bounding_box(&self) -> (Vector, Vector)
pub fn bounding_box(&self) -> (Vector, Vector)
Calculate bounding coordinates of the model
pub fn name(&self) -> &str
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