Radium Engine
1.5.14
|
An entity is an scene element. It ties together components with a transform. More...
#include <Engine/Scene/Entity.hpp>
Public Member Functions | |
Entity (const std::string &name="") | |
Entity (const Entity &entity)=delete | |
Entity & | operator= (const Entity &)=delete |
const std::string & | getName () const |
void | rename (const std::string &name) |
void | setTransform (const Core::Transform &transform) |
void | setTransform (const Core::Matrix4 &transform) |
const Core::Transform & | getTransform () const |
const Core::Matrix4 & | getTransformAsMatrix () const |
void | swapTransformBuffers () |
Core::Utils::Observable< const Entity * > & | transformationObservers () const |
get a ref to transformation observers to add/remove an observer | |
void | addComponent (Component *component) |
Add a component to the given entity. Component ownership is transfered to the entity. | |
void | removeComponent (const std::string &name) |
Deletes a component with a given name. | |
Component * | getComponent (const std::string &name) |
Get component with a given name. | |
const Component * | getComponent (const std::string &name) const |
const std::vector< std::unique_ptr< Component > > & | getComponents () const |
uint | getNumComponents () const |
Get component belonging to a given system. | |
virtual Core::Aabb | computeAabb () |
void | invalidateAabb () |
Public Member Functions inherited from Ra::Core::Utils::IndexedObject | |
IndexedObject (Index idx=Index::Invalid()) | |
CONSTRUCTOR. | |
IndexedObject (const IndexedObject &id_obj)=default | |
void | setIndex (const Index &idx) |
const Index & | getIndex () const |
Additional Inherited Members | |
Protected Attributes inherited from Ra::Core::Utils::IndexedObject | |
Index | m_idx |
VARIABLE. | |
An entity is an scene element. It ties together components with a transform.
Definition at line 22 of file Entity.hpp.
|
explicit |
Definition at line 12 of file Entity.cpp.
|
override |
Definition at line 18 of file Entity.cpp.
Add a component to the given entity. Component ownership is transfered to the entity.
Definition at line 26 of file Entity.cpp.
|
virtual |
Definition at line 78 of file Entity.cpp.
Component * Ra::Engine::Scene::Entity::getComponent | ( | const std::string & | name | ) |
Get component with a given name.
Definition at line 40 of file Entity.cpp.
const Component * Ra::Engine::Scene::Entity::getComponent | ( | const std::string & | name | ) | const |
Definition at line 48 of file Entity.cpp.
const std::vector< std::unique_ptr< Component > > & Ra::Engine::Scene::Entity::getComponents | ( | ) | const |
Definition at line 55 of file Entity.cpp.
|
inline |
Definition at line 89 of file Entity.hpp.
|
inline |
Get component belonging to a given system.
Definition at line 118 of file Entity.hpp.
|
inline |
Definition at line 106 of file Entity.hpp.
|
inline |
Definition at line 112 of file Entity.hpp.
void Ra::Engine::Scene::Entity::invalidateAabb | ( | ) |
Definition at line 94 of file Entity.cpp.
void Ra::Engine::Scene::Entity::removeComponent | ( | const std::string & | name | ) |
Deletes a component with a given name.
Definition at line 59 of file Entity.cpp.
|
inline |
Definition at line 93 of file Entity.hpp.
Definition at line 102 of file Entity.hpp.
Definition at line 97 of file Entity.hpp.
void Ra::Engine::Scene::Entity::swapTransformBuffers | ( | ) |
Definition at line 70 of file Entity.cpp.
|
inline |
get a ref to transformation observers to add/remove an observer
Definition at line 122 of file Entity.hpp.