ClearDirtySystem.ixx File
System template that clears dirty flags on active dirty-tracker components. More...
Included Headers
#include <helios.engine.core.concepts.IsDirtyTrackerLike>
#include <helios.ecs.components>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.world.tags.SystemRole>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | core |
| namespace | systems |
| namespace | components |
Classes Index
| class | ClearDirtySystem<TMemberHandle, TComponentSpecs> |
|
Generic ECS system that resets dirty state for configured component types. More... | |
Description
System template that clears dirty flags on active dirty-tracker components.
File Listing
The file content with the documentation metadata removed is:
17using namespace helios::engine::runtime::world;
19using namespace helios::engine::runtime::world::tags;
20export namespace helios::engine::core::systems {
32 template<typename TMemberHandle, typename ... TComponentSpecs>
33 requires (IsDirtyTrackerLike<typename TComponentSpecs::template type<TMemberHandle>> && ...)
34 class ClearDirtySystem {
43 void clearDirtyFor(UpdateContext& updateContext) {
45 using Component = typename TComponentSpec::template type<TMemberHandle>;
47 for (auto [entity, cmp, active] : updateContext.view<
48 TMemberHandle,
49 Component,
50 Active<TMemberHandle>>().whereEnabled()) {
51 cmp->clearDirty();
62 using EngineRoleTag = SystemRole;
69 void update(UpdateContext& updateContext) noexcept {
70 (clearDirtyFor<TComponentSpecs>(updateContext), ...);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.