Radium Engine
1.5.20
|
#include <Engine/Scene/System.hpp>
Public Member Functions | |
virtual void | handleAssetLoading (Entity *entity, const Core::Asset::FileData *data) |
virtual void | generateTasks (Core::TaskQueue *taskQueue, const Engine::FrameInfo &frameInfo)=0 |
Pure virtual method to be overridden by any system. Must register in taskQueue the operations that must be done ate each frame. | |
std::vector< Component * > | getEntityComponents (const Entity *entity) |
void | addComponent (Entity *entity, Component *component) |
Protected Member Functions | |
virtual void | registerComponent (const Entity *entity, Component *component) |
virtual void | unregisterComponent (const Entity *entity, Component *component) |
virtual void | unregisterAllComponents (const Entity *entity) |
Protected Attributes | |
std::vector< std::pair< const Entity *, Component * > > | m_components |
List of active components. | |
Friends | |
class | Component |
Systems are responsible of updating a specific subset of the components of each entity. They can provide factory methods to create components, but their main role is to keep a list of "active" components associated to an entity. At each frame, each system loaded into the engine will be queried for tasks. The goal of the tasks is to update the active components during the frame.
Definition at line 30 of file System.hpp.
Register an already configured component to the system.
entity | The entity owning the component |
component | The component to add to the system |
Definition at line 73 of file System.hpp.
|
pure virtual |
Pure virtual method to be overridden by any system. Must register in taskQueue the operations that must be done ate each frame.
taskQueue | The queue to fill |
frameInfo | Information about the current frame ( |
Implemented in Ra::Engine::Scene::CameraManager, Ra::Engine::Scene::LightManager, and Ra::Engine::Scene::SkeletonBasedAnimationSystem.
std::vector< Component * > Ra::Engine::Scene::System::getEntityComponents | ( | const Entity * | entity | ) |
Returns the components stored for the given entity.
entity |
Definition at line 50 of file System.cpp.
|
inlinevirtual |
Factory method for component creation from file data. From a given file and the corresponding entity, the system will create the corresponding components, add them to the entity, and register the component.
Reimplemented in Ra::Engine::Scene::CameraManager, Ra::Engine::Scene::LightManager, and Ra::Engine::Scene::SkeletonBasedAnimationSystem.
Definition at line 46 of file System.hpp.
|
protectedvirtual |
Registers a component belonging to an entity, making it active within the system.
entity | |
component |
Reimplemented in Ra::Engine::Scene::CameraManager, and Ra::Engine::Scene::LightManager.
Definition at line 10 of file System.cpp.
|
protectedvirtual |
Removes all components belonging to a given entity.
entity |
Reimplemented in Ra::Engine::Scene::CameraManager, and Ra::Engine::Scene::LightManager.
Definition at line 40 of file System.cpp.
|
protectedvirtual |
Unregisters a component. The system will not update it.
entity | |
component |
Reimplemented in Ra::Engine::Scene::CameraManager, and Ra::Engine::Scene::LightManager.
Definition at line 26 of file System.cpp.
|
friend |
Definition at line 32 of file System.hpp.
|
protected |
List of active components.
Definition at line 103 of file System.hpp.