[−][src]Struct crystal_engine::GameState
Contains the game state. This struct is passed to Game::init and Game::update.
Fields
camera: Matrix4<f32>
The matrix of the camera currently in use.
It is currently not possible to change the near and far boundaries of the camera. This might be added in a later version.
keyboard: KeyboardState
Get the current keyboard state.
Implementations
impl GameState
[src]
pub fn terminate_game(&mut self)
[src]
Exit the game. Once this function is called, it cannot be cancelled. This does not confirm with Game::can_shutdown.
pub fn create_triangle_model(&mut self) -> ModelHandle
[src]
Create a new triangle at the origin of the world. See ModelHandle for information on how to move and rotate the triangle.
To create a second instance with the same model, simply call ModelHandle::clone
pub fn create_model_from_obj(&mut self, path: impl AsRef<Path>) -> ModelHandle
[src]
Load a model from the given path and place it at the origin of the world. See ModelHandle for information on how to move and rotate the triangle.
To create a second instance with the same model, simply call ModelHandle::clone
Auto Trait Implementations
impl !RefUnwindSafe for GameState
impl Send for GameState
impl !Sync for GameState
impl Unpin for GameState
impl !UnwindSafe for GameState
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SafeBorrow<T> for T
[src]
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.
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.
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>,