[−][src]Struct kiss3d::resource::MeshManager
The mesh manager.
Upon construction, it contains:
It keeps a cache of already-loaded meshes. Note that this is only a cache, nothing more. Thus, its usage is not required to load meshes.
Implementations
impl MeshManager
[src]
pub fn new() -> MeshManager
[src]
Creates a new mesh manager.
pub fn get_global_manager<T, F: FnMut(&mut MeshManager) -> T>(f: F) -> T
[src]
Mutably applies a function to the mesh manager.
pub fn get(&mut self, name: &str) -> Option<Rc<RefCell<Mesh>>>
[src]
Get a mesh with the specified name. Returns None
if the mesh is not registered.
pub fn add(&mut self, mesh: Rc<RefCell<Mesh>>, name: &str)
[src]
Adds a mesh with the specified name to this cache.
pub fn add_trimesh(
&mut self,
descr: TriMesh<f32>,
dynamic_draw: bool,
name: &str
) -> Rc<RefCell<Mesh>>
[src]
&mut self,
descr: TriMesh<f32>,
dynamic_draw: bool,
name: &str
) -> Rc<RefCell<Mesh>>
Adds a mesh with the specified mesh descriptor and name.
pub fn remove(&mut self, name: &str)
[src]
Removes a mesh from this cache.
pub fn load_obj(
path: &Path,
mtl_dir: &Path,
geometry_name: &str
) -> IoResult<Vec<(String, Rc<RefCell<Mesh>>, Option<MtlMaterial>)>>
[src]
path: &Path,
mtl_dir: &Path,
geometry_name: &str
) -> IoResult<Vec<(String, Rc<RefCell<Mesh>>, Option<MtlMaterial>)>>
Loads the meshes described by an obj file.
Auto Trait Implementations
impl !RefUnwindSafe for MeshManager
[src]
impl !Send for MeshManager
[src]
impl !Sync for MeshManager
[src]
impl Unpin for MeshManager
[src]
impl !UnwindSafe for MeshManager
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,