var searchIndex = {}; searchIndex["trex"] = {"doc":"An entity component system inspired by _entityx_. The core of `trex` is the `simulation!` macro,\nwhich wires together all of the components, events, and systems. `Entity`s and `Component`s are\nmanaged through the `World` interface. Events are queued and emitted through the `Events`\ninterface, which is automatically generated by the `simulation!` macro.","items":[[3,"ComponentFilter","trex","Used to filter the list of entities based on the components that are attached to them.",null,null],[3,"World","","Contains all entities and their components.",null,null],[3,"EventQueue","","Allows for emitting events and iterating over them in the order that they were emitted.\nEvents are immutable and queues are not flushed until the end of the frame, so multiple\nclients can receive events from the same queue.",null,null],[3,"Halt","","Internal event used to stop the `Simulation`. The `halt` event queue will always be created.",null,null],[5,"next_family","","Generates the next unique family. This method should never be called manually. Concrete\ncomponents should be passed into the `simulation!` macro, which will setup the families.",null,{"inputs":[],"output":{"name":"family"}}],[5,"calc_millis","","Helper function for calculating the time in milliseconds since the last update.",null,{"inputs":[{"name":"duration"}],"output":{"name":"f32"}}],[11,"new","","Create an empty `ComponentFilter`.",0,{"inputs":[],"output":{"name":"componentfilter"}}],[11,"with","","Extend the filter to include the given component type.",0,null],[11,"new","","Create an empty `World`.",1,{"inputs":[],"output":{"name":"world"}}],[11,"register_component","","Register a new component class.",1,null],[11,"exists","","Returns `true` if the entity has been created and is not destroyed, otherwise `false`.",1,null],[11,"create","","Create a new `Entity`.",1,null],[11,"tag","","Assign a tag to the `Entity` so that it can be retrieved later.",1,null],[11,"untag","","Remove the existing tag, if any, from an `Entity`.",1,null],[11,"lookup","","Retreive an `Entity` using a tag.",1,null],[11,"destroy","","Destroy an existing `Entity`. Also removes the tag and any attached components.",1,null],[11,"filter_entities","","Returns a list of all `Entity`s with a given set of `Component`s.",1,null],[11,"add","","Attach a `Component` to an `Entity`.",1,null],[11,"remove","","Remove a `Component` from an `Entity`.",1,null],[11,"has","","Returns `true` if the `Entity` has the `Component`, otherwise `false`.",1,null],[11,"get","","Get a `Component` of an `Entity`.",1,null],[11,"get_mut","","Get a mutable `Component` of an `Entity`.",1,null],[11,"new","","Create a new, empty `EventQueue`.",2,{"inputs":[],"output":{"name":"eventqueue"}}],[11,"emit","","Emit a new event to the queue.",2,null],[11,"receive","","Iterate over all events in the queue.",2,null],[11,"flush","","Clear all events from the queue.",2,null],[6,"Family","","The unique family of a component.",null,null],[6,"Entity","","Used to group components.",null,null],[8,"Component","","Trait implemented by all components in order to distinguish stores of different components.\nthis trait should never by implemented manually. Concrete components should be passed into the\n`simulation!` macro, which will implement this trait for each component.",null,null],[10,"family","","Returns the unique `Family` for the `Component`.",3,{"inputs":[],"output":{"name":"family"}}],[8,"System","","Trait that must be implemented by all systems in the `Simulation`. The generic parameter `E` is\nthe `Events` type generated by the `simulation!` macro.",null,null],[10,"new","","`System`s should be initializable with an empty constructor.",4,{"inputs":[],"output":{"name":"self"}}],[10,"update","","This method is called each frame, giving the `System` mutable access to the `World` and\n`Events`. `dt` is the time in milliseconds since the last update.",4,null],[14,"component!","","Used to implement the component trait for a given type. This macro should never be called\nmanually. Concrete components should be passed into the `simulation!` macro, which will call\nthis macro.",null,null],[14,"simulation!","","The core wiring for entity component systems built on `trex`. This macro takes a set of\n`Component`s, events, and `System`s, and creates a `Simulation` type that manages them.\nSee the library documentation for an example of how this macro is used.",null,null]],"paths":[[3,"ComponentFilter"],[3,"World"],[3,"EventQueue"],[8,"Component"],[8,"System"]]}; initSearch(searchIndex);