3#include <Core/Utils/Index.hpp>
5#include <Eigen/Geometry>
6#include <Engine/RaEngine.hpp>
18class RenderObjectManager;
68 void removeRenderObject(
const Core::Utils::Index& roIdx );
76 virtual bool canEdit(
const Core::Utils::Index& )
const {
return false; }
79 virtual Core::Transform
getTransform(
const Core::Utils::Index& )
const {
80 return Core::Transform::Identity();
85 const Core::Transform& ) {}
87 void notifyRenderObjectExpired(
const Core::Utils::Index& idx );
90 virtual Core::Aabb computeAabb();
92 void invalidateAabb();
98 static Rendering::RenderObjectManager* getRoMgr();
105 Entity* m_entity {
nullptr };
106 System* m_system {
nullptr };
109 bool m_isAabbValid {
false };
A component is an element that can be updated by a system. It is also linked to some other components...
virtual System * getSystem() const
Returns the system to which the component belongs.
virtual const std::string & getName() const
Return the component's name.
virtual Entity * getEntity() const
Return the entity the component belongs to.
virtual void setTransform(const Core::Utils::Index &, const Core::Transform &)
Set the new transform associated with the RO index key.
virtual Core::Transform getTransform(const Core::Utils::Index &) const
Get the transform associated with the given RO index key.
virtual void initialize()=0
Pure virtual method to be overridden by any component. When this method is called you are guaranteed ...
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 void setEntity(Entity *entity)
Set entity the component is part of. This method is called by the entity.
virtual void setSystem(System *system)
Set the system to which the component belongs.
An entity is an scene element. It ties together components with a transform.
hepler function to manage enum as underlying types in VariableSet