Quantum 3
3.1.0
A multi-threaded system to parallelize updating components. More...
Public Member Functions | |
| sealed override void | OnInit (Frame frame) |
| Initializes the system and call the virtual OnInitUser(Frame) method. More... | |
| abstract void | Update (FrameThreadSafe frame, EntityRef entity, T *component) |
| Override to add workload. More... | |
Public Member Functions inherited from Quantum.SystemBase | |
| SystemBase () | |
| Create a new instance of a system without children. More... | |
| SystemBase (params SystemBase[] children) | |
| Create a new instance of a system with children. More... | |
| SystemBase (string scheduleSample) | |
| Create a new instance of a system without children. More... | |
| void | Disable (Frame frame) |
| void | Enable (Frame frame) |
| bool | IsEnabledInHierarchy (Frame frame) |
| bool | IsEnabledSelf (Frame frame) |
| virtual void | OnDisabled (Frame frame) |
| Is called when the system was disabled, for example after calling Frame.SystemDisable(Type). The base implementation calls OnDisabled on the child systems that are enabled themselves. More... | |
| virtual void | OnEnabled (Frame frame) |
| Is called when the system was enabled, for example after calling Frame.SystemEnable<T>() or when the game starts with StartEnabled set. The base implementation calls OnEnabled on the child systems that are enabled themselves. More... | |
| virtual void | OnResync (Frame frame) |
| Is called when the simulation is about to start from a snapshot. More... | |
| TaskHandle | OnSchedule (Frame frame, TaskHandle taskHandle) |
| Creates the task graph for the system by calling Schedule and then scheduling the enabled child systems. Exceptions thrown by the children are collected and thrown after all systems were scheduled, so the task handles of the other children are kept. More... | |
Public Attributes | |
| virtual int | SlicesCount => MAX_SLICES_COUNT / 2 |
| Override to specify the number of slices to use. More... | |
Protected Member Functions | |
| virtual void | OnInitUser (Frame frame) |
| Override to initialize a custom system. More... | |
| override TaskHandle | Schedule (Frame frame, TaskHandle taskHandle) |
| Override to schedule extra tasks. More... | |
Additional Inherited Members | |
Properties inherited from Quantum.SystemBase | |
| IEnumerable< SystemBase > | ChildSystems [get] |
| The direct child systems of this system. More... | |
| IEnumerable< SystemBase > | Hierarchy [get] |
| Enumerates this system and all of its descendants, depth-first. More... | |
| SystemBase | ParentSystem [get] |
| The parent system in the system hierarchy. More... | |
| string | ProfilerName [get] |
| The name of the system in the profiler, defaults to the type name. More... | |
| Int32 | RuntimeIndex [get] |
| A unique index assigned to identify systems at runtime. More... | |
| virtual Boolean | StartEnabled [get, set] |
Set to true when the simulation should start with this system enabled. More... | |
A multi-threaded system to parallelize updating components.
Only access to the component itself and FrameThreadSafe is safe.
Array task: similar to SystemThreadedComponent<T>, but, instead of slicing the component buffer in N slices of a fixed size each, the buffer is sliced in a fixed number of slices and the size of the slice depends on the size of the buffer, which must be known in Schedule time.
For more information request access to the online multi-threading documentation.
| T | Component type to update. |
| T | : | unmanaged | |
| T | : | IComponent |
|
inlinevirtual |
Initializes the system and call the virtual OnInitUser(Frame) method.
| frame | The referenced frame. |
Reimplemented from Quantum.SystemBase.
|
inlineprotectedvirtual |
Override to initialize a custom system.
| frame | The referenced frame. |
|
inlineprotectedvirtual |
Override to schedule extra tasks.
| frame | The referenced frame. |
| taskHandle | The initial task handle. |
Implements Quantum.SystemBase.
|
pure virtual |
Override to add workload.
Only access to the component itself and FrameThreadSafe is safe.
| frame | The thread-safe referenced frame. |
| entity | The entity that the component belongs to, only read access is safe. |
| component | The component to update. |
| virtual int Quantum.Task.SystemArrayComponent< T >.SlicesCount => MAX_SLICES_COUNT / 2 |
Override to specify the number of slices to use.