lullaby/tests/sort_order_test.cc
// Creates a transform system and |num_entities| entities starting at 1.
// TestComponents for each entity are added to |component_map| if not null.
Creates a transform system and |num_entities| entities starting at 1.
TestComponents for each entity are added to |component_map| if not null.
Creates a transform system and |num_entities| entities starting at 1 . TestComponents for each entity are added to |component_map| if not null .
TransformSystem* CreateTransformSystemWithEntities(
    Registry* registry, int num_entities,
    RenderPoolMap<TestComponent>* component_map = nullptr) {
  registry->Create<EntityFactory>(registry)->CreateSystem<TransformSystem>();
  auto* transform_system = registry->Get<TransformSystem>();
  for (int i = 1; i <= num_entities; ++i) {
    transform_system->Create(i, Sqt());
    if (component_map) {
      component_map->EmplaceComponent(i, RenderPass_Main);
    }
  }
  return transform_system;
}
TransformSystem * CreateTransformSystemWithEntities ( Registry * registry , int num_entities , RenderPoolMap < TestComponent > * component_map = nullptr ) { registry -> Create < EntityFactory > ( registry ) -> CreateSystem < TransformSystem > ( ) ; auto * transform_system = registry -> Get < TransformSystem > ( ) ; for ( int i = 1 ; i <= num_entities ; ++ i ) { transform_system -> Create ( i , Sqt ( ) ) ; if ( component_map ) { component_map -> EmplaceComponent ( i , RenderPass_Main ) ; } } return transform_system ; }
Creates a transform system and |num_entities| entities starting at 1.
Creates a transform system and |num_entities| entities starting at 1 .