diff options
Diffstat (limited to 'stockton-types/src/lib.rs')
-rw-r--r-- | stockton-types/src/lib.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/stockton-types/src/lib.rs b/stockton-types/src/lib.rs new file mode 100644 index 0000000..259c40c --- /dev/null +++ b/stockton-types/src/lib.rs @@ -0,0 +1,27 @@ +//! Common types for all stockton crates. + +extern crate stockton_bsp; +extern crate nalgebra as na; + +use stockton_bsp::BSPFile; + +pub mod entity_store; +use entity_store::EntityStore; + +/// Alias for convenience +pub type Vector2 = na::base::Vector2<f32>; +/// Alias for convenience +pub type Vector3 = na::base::Vector3<f32>; + +/// Alias for convenience +pub type Vector2i = na::base::Vector2<i32>; + +/// Alias for convenience +pub type Vector3i = na::base::Vector3<i32>; + +/// A live and playable world. There are two parts: The map, which has walls and other static objects, +/// and entities, which can move around and do things and are physics simulated. +pub struct World<'a> { + pub map: BSPFile<'a>, + pub live_entities: EntityStore, +}
\ No newline at end of file |