A component is an element that can be updated by a system. It is also linked to some other components in an entity. Each component share a transform through their entity.
More...
#include <Engine/Scene/Component.hpp>
|
| Component (const std::string &name, Entity *entity) |
| CONSTRUCTOR.
|
|
virtual | ~Component () |
| DESTRUCTOR.
|
|
virtual void | initialize ()=0 |
| Pure virtual method to be overridden by any component. When this method is called you are guaranteed that all other startup systems have been loaded.
|
|
virtual void | setEntity (Entity *entity) |
| Set entity the component is part of. This method is called by the entity. More...
|
|
virtual Entity * | getEntity () const |
| Return the entity the component belongs to.
|
|
virtual const std::string & | getName () const |
| Return the component's name.
|
|
virtual void | setSystem (System *system) |
| Set the system to which the component belongs.
|
|
virtual System * | getSystem () const |
| Returns the system to which the component belongs.
|
|
Core::Utils::Index | addRenderObject (Rendering::RenderObject *renderObject) |
| Add a new render object to the component. This adds the RO to the manager for drawing.
|
|
void | removeRenderObject (const Core::Utils::Index &roIdx) |
| Remove the render object from the component.
|
|
virtual bool | canEdit (const Core::Utils::Index &) const |
| Returns true if a transform can be edited with the render object index given as a key.
|
|
virtual Core::Transform | getTransform (const Core::Utils::Index &) const |
| Get the transform associated with the given RO index key.
|
|
virtual void | setTransform (const Core::Utils::Index &, const Core::Transform &) |
| Set the new transform associated with the RO index key.
|
|
void | notifyRenderObjectExpired (const Core::Utils::Index &idx) |
|
virtual Core::Aabb | computeAabb () |
|
void | invalidateAabb () |
|
const std::vector< Core::Utils::Index > & | getRenderObjects () |
|
|
std::vector< Core::Utils::Index > | m_renderObjects |
|
|
static Rendering::RenderObjectManager * | getRoMgr () |
| Shortcut to access the render object manager.
|
|
|
std::string | m_name {} |
|
Entity * | m_entity { nullptr } |
|
System * | m_system { nullptr } |
|
A component is an element that can be updated by a system. It is also linked to some other components in an entity. Each component share a transform through their entity.
Definition at line 30 of file Component.hpp.
◆ setEntity()
virtual void Ra::Engine::Scene::Component::setEntity |
( |
Entity * |
entity | ) |
|
|
inlinevirtual |
Set entity the component is part of. This method is called by the entity.
- Parameters
-
entity | The entity the component is part of. |
Definition at line 50 of file Component.hpp.
The documentation for this class was generated from the following files:
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Scene/Component.hpp
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Scene/Component.cpp