pub struct Renderer {
pub models: HashMap<String, Model>,
pub meshes: HashMap<String, Mesh>,
pub instance_meshes: HashMap<String, InstanceMesh>,
pub lights: HashMap<String, Light>,
pub particles: HashMap<String, Particle>,
pub camera: Camera,
/* private fields */
}Fields§
§models: HashMap<String, Model>§meshes: HashMap<String, Mesh>§instance_meshes: HashMap<String, InstanceMesh>§lights: HashMap<String, Light>§particles: HashMap<String, Particle>§camera: CameraImplementations§
Source§impl Renderer
impl Renderer
pub fn add_mesh_from_vertices_and_indices( &mut self, name: &str, vertices: Vec<Vertex>, indices: Vec<u32>, ) -> Result<(), String>
pub fn add_mesh(&mut self, name: &str, mesh: Mesh) -> Result<(), String>
pub fn get_mesh_mut(&mut self, name: &str) -> Option<&mut Mesh>
pub fn get_mesh(&self, name: &str) -> Option<&Mesh>
pub fn destroy_mesh(&mut self, name: &str) -> Result<(), String>
Source§impl Renderer
impl Renderer
pub fn add_instance_mesh( &mut self, name: &str, mesh: InstanceMesh, ) -> Result<(), String>
Source§impl Renderer
impl Renderer
pub fn add_particle(&mut self, name: &str, particle: Particle)
pub fn remove_particle(&mut self, name: &str)
Auto Trait Implementations§
impl Freeze for Renderer
impl RefUnwindSafe for Renderer
impl Send for Renderer
impl Sync for Renderer
impl Unpin for Renderer
impl UnsafeUnpin for Renderer
impl UnwindSafe for Renderer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more