SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Entity Class Reference

Entity Class. This class defines the specific behaves of Entity. More...

#include <Entity.h>

Public Member Functions

 Entity ()=default
 Constructor Function.
 
 Entity (entt::entity handle, World *world)
 Constructor Function. Init class variable. Usually call it.
 
virtual ~Entity ()=default
 Destructor Function.
 
template<typename T , typename... Args>
T & AddComponent (Args &&... args)
 Template Function. Used for add specific component to entity.
 
template<typename T >
T & GetComponent () const
 Get Component owned by this entity.
 
template<typename T >
void RemoveComponent () const
 Remove Component owned from this entity.
 
void RemoveFromRoot ()
 Remove a entity from this world root.
 
void AddToRoot ()
 Add a entity to this world root.
 
template<typename T >
bool HasComponent () const
 If Component is owned by this entity or not.
 
const UUID GetUUID ()
 Get UUID form UUIDComponent.
 
 operator bool () const
 Empty Operation.
 
 operator uint32_t () const
 Empty Operation.
 
 operator entt::entity () const
 Empty Operation.
 
bool operator== (const Entity &other) const
 Equal Operation.
 
bool operator!= (const Entity &other) const
 Not equal Operation.
 

Private Attributes

entt::entity m_EntityHandle { entt::null }
 This entity's identify in ECS.
 
Worldm_World = nullptr
 A specific world Pointer.
 

Detailed Description

Entity Class. This class defines the specific behaves of Entity.

Definition at line 19 of file Entity.h.


The documentation for this class was generated from the following file: