Class atlas::entity_t
Public Functions
Type | Name |
---|---|
void | add () |
entity_t () = default |
|
entity_t (flecs::world * p_registry, const std::string & p_tag) |
|
entity_t (const flecs::entity & p_entity) |
|
const UComponent * | get () const |
UComponent * | get_mut () const |
bool | has () const |
bool | is_alive () const |
void | on_destruction () |
entity () const |
|
entity () |
|
void | remove () |
void | set (const UComponent & p_component) |
void | set (const UComponent1 & p_component1, const UComponent2 & p_component2) |
~entity_t () |
Public Functions Documentation
function add
template<typename UComponent>
inline void atlas::entity_t::add ()
Note:
Creates component in the ECS storage but does not assign it with a value.
function entity_t [1/3]
atlas::entity_t::entity_t () = default
function entity_t [2/3]
atlas::entity_t::entity_t (
flecs::world * p_registry,
const std::string & p_tag
)
function entity_t [3/3]
inline atlas::entity_t::entity_t (
const flecs::entity & p_entity
)
function get
template<typename UComponent>
inline const UComponent * atlas::entity_t::get () const
Note:
Returns the component from the entity
Note:
Flecs has you return a pointer for checking if the component is found
Note:
If not found will return nullptr
function get_mut
template<typename UComponent>
inline UComponent * atlas::entity_t::get_mut () const
function has
template<typename UComponent>
inline bool atlas::entity_t::has () const
Note:
Checks if specific component of type UComponent is provided to this entity
function is_alive
inline bool atlas::entity_t::is_alive () const
Note:
Flecs allows to check when an entity has been created
Note:
Knowing when this entity lifecyle's ended
function on_destruction
inline void atlas::entity_t::on_destruction ()
function entity [1/2]
inline atlas::entity_t::entity () const
function entity [2/2]
inline atlas::entity_t::entity ()
function remove
template<typename UComponent>
inline void atlas::entity_t::remove ()
function set [1/2]
template<typename UComponent>
inline void atlas::entity_t::set (
const UComponent & p_component
)
Note:
Setting a component TODO: Try to allow the set component to be set to its initial value Initial value should be set when the component that is set is empty
function set [2/2]
template<typename UComponent1, typename UComponent2>
inline void atlas::entity_t::set (
const UComponent1 & p_component1,
const UComponent2 & p_component2
)
Note:
Set value for position and velocity component
Note:
Flecs set component will be added if entity doesn't the component
Note:
This is for setting multiple different components to be stored into the entity
function ~entity_t
atlas::entity_t::~entity_t ()
The documentation for this class was generated from the following file TheAtlasEngine/atlas/core/scene/entity.hpp