3#include <Engine/RaEngine.hpp>
11#include <Core/Utils/IndexedObject.hpp>
12#include <Core/Utils/Observable.hpp>
38 inline void setTransform(
const Core::Transform& transform );
39 inline void setTransform(
const Core::Matrix4& transform );
40 const Core::Transform& getTransform()
const;
41 const Core::Matrix4& getTransformAsMatrix()
const;
43 void swapTransformBuffers();
50 void addComponent(
Component* component );
64 inline uint getNumComponents()
const;
66 virtual Core::Aabb computeAabb();
68 void invalidateAabb();
71 Core::Transform m_transform;
72 Core::Transform m_doubleBufferedTransform;
78 bool m_transformChanged {
false };
80 bool m_isAabbValid {
false };
93inline void Entity::rename(
const std::string& name ) {
97inline void Entity::setTransform(
const Core::Transform& transform ) {
98 m_transformChanged =
true;
99 m_doubleBufferedTransform = transform;
102inline void Entity::setTransform(
const Core::Matrix4& transform ) {
103 setTransform( Core::Transform( transform ) );
106inline const Core::Transform& Entity::getTransform()
const {
112inline const Core::Matrix4& Entity::getTransformAsMatrix()
const {
115 return m_transform.matrix();
119 return uint( m_components.size() );
123 return m_transformationObservers;
A component is an element that can be updated by a system. It is also linked to some other components...
An entity is an scene element. It ties together components with a transform.
Core::Utils::Observable< const Entity * > & transformationObservers() const
get a ref to transformation observers to add/remove an observer
uint getNumComponents() const
Get component belonging to a given system.
hepler function to manage enum as underlying types in VariableSet