Struct turbine::world::World
[−]
[src]
pub struct World { pub mask: Vec<Mask>, pub init: Physics, pub prev: Physics, pub current: Physics, pub next: Physics, pub aabb: Vec<AABB>, pub name: Vec<Option<Arc<String>>>, }
Stores the world data.
Fields
mask: Vec<Mask>
The active components per entity.
init: Physics
The initial state of physics.
prev: Physics
The previous state.
current: Physics
The current state.
next: Physics
The next state.
aabb: Vec<AABB>
An AABB relative to position.
name: Vec<Option<Arc<String>>>
An optional name describing the entity. Multiple entities can share the same name.
Methods
impl World
[src]
fn new() -> World
[src]
Returns a new World
.
fn swap_physics(&mut self)
[src]
Swaps the physical state such that previous is now next.
fn find_free_entity_slot(&self) -> Option<usize>
[src]
Finds the first free entity slot.
fn set_position_with_no_velocity(&mut self, id: usize, pos: Vec3)
[src]
Sets position with no velocity.
fn add_entity(&mut self, pos: Vec3)
[src]
Adds a new entity. Marks the entity as alive and selects it.