Chira Engine
A customizable MIT-licensed game engine.
chira::Entity Class Reference

The base entity class. More...

#include <Entity.h>

Collaboration diagram for chira::Entity:

Public Member Functions

 Entity (const Entity &)=default
 
Entityoperator= (const Entity &)=default
 
 Entity (Entity &&)=default
 
Entityoperator= (Entity &&)=default
 
template<typename T , typename... Args>
T & addComponent (Args &&...args)
 
template<typename T >
void addTagComponent ()
 
template<typename T >
T & getComponent ()
 
template<typename T >
T & getComponent () const
 
template<typename T >
T * tryGetComponent () const
 
template<typename T >
bool hasComponent () const
 
template<typename T >
void tryRemoveComponent ()
 
template<typename T >
void removeComponent ()
 
bool getVisible () const
 
void setVisible (bool visible)
 
std::string getName () const
 
TransformComponentgetTransform ()
 
const TransformComponentgetTransform () const
 
uuids::uuid getUUID ()
 
uuids::uuid getSceneUUID ()
 
entt::entity getRawHandle () const
 
 operator bool () const
 
bool operator! () const
 
bool operator== (const Entity &other) const
 
bool operator!= (const Entity &other) const
 

Protected Member Functions

 Entity (Scene *scene_)
 

Protected Attributes

Scenescene = nullptr
 
entt::entity handle = entt::null
 

Detailed Description

The base entity class.

Definition at line 17 of file Entity.h.


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