3#include "Components/Core/SceneComponent.h"
5#include "Foundation/ComponentModel/Entity.h"
13 template<
typename ComponentType,
typename MemberType,
class Recurse>
20 for (
auto & component : collection) {
21 component.*member = value;
22 component.setChanged();
26 if (recurse ==
nullptr || recurse(entity)) {
29 for (
auto& child : sceneComponent->
children) {
Typed collection of components.
Container for components, providing composition of dynamic entities.
T * getComponent() const
Get a pointer to the first component implementing the given type in the entity.
void getComponents(ComponentCollection< T > &collection) const
Get all the components implementing the templated type.
Contains information on how the entity behaves in the scene.
std::vector< EntityPtr > children
Contains all child entities owned by this component.
void applyRecursiveFieldChange(ComponentModel::Entity *entity, MemberType ComponentType::*member, MemberType value, Recurse recurse)
Contains all Cogs related functionality.