25 enum Flag : std::uintptr_t {
39 bool alive()
const {
return this->flags.
is_set(Flag::ALIVE); }
53 std::vector<std::array<char, 32>>
names = {},
tags = {};
56 size_t max()
const {
return this->v.capacity(); }
57 size_t n()
const {
return this->v.
size(); }
local class const
Definition animation.lua:7
name
Definition cathedral.lua:11
void update_children()
Definition entity.cpp:177
std::vector< nngn::Hash > name_hashes
Definition entity.h:54
std::vector< std::array< char, 32 > > names
Definition entity.h:53
std::vector< std::array< char, 32 > > tags
Definition entity.h:53
std::vector< nngn::Hash > tag_hashes
Definition entity.h:54
void clear_flags()
Definition entity.cpp:184
size_t max() const
Definition entity.h:56
void set_name(Entity *e, std::string_view s)
Definition entity.cpp:154
nngn::static_vector< Entity > v
Definition entity.h:52
void set_max(std::size_t n)
Definition entity.cpp:116
size_t n() const
Definition entity.h:57
nngn::Hash tag_hash(const Entity &e) const
Definition entity.cpp:150
std::span< const char, 32 > tag(const Entity &e) const
Definition entity.cpp:142
void remove(Entity *e)
Definition entity.h:60
void set_tag(Entity *e, std::string_view s)
Definition entity.cpp:158
nngn::Hash name_hash(const Entity &e) const
Definition entity.cpp:146
Entity * add()
Definition entity.cpp:124
Fixed-size vector with an embedded free list.
Definition static_vector.h:21
std::size_t size(void) const
Calculates the true size (excluding the entries in the free list).
Definition static_vector.h:87
void erase(T *p)
Removes element p from the vector.
Definition static_vector.h:123
update
Definition img_common.lua:42
local l
Definition light.lua:23
#define NNGN_EXPOSE_ITERATOR(n, m)
Definition utils.h:67
void set_parent(Entity *e)
Definition entity.cpp:111
void set_collider(nngn::Collider *p)
Definition entity.cpp:86
nngn::vec3 a
Definition entity.h:32
nngn::Camera * camera
Definition entity.h:36
void set_renderer(nngn::Renderer *p)
Definition entity.cpp:79
void set_animation(nngn::Animation *p)
Definition entity.cpp:94
void set_vel(nngn::vec3 v)
Definition entity.cpp:73
void set_pos(nngn::vec3 p)
Definition entity.cpp:67
nngn::Renderer * renderer
Definition entity.h:33
nngn::Flags< Flag > flags
Definition entity.h:28
float max_v
Definition entity.h:31
nngn::vec3 v
Definition entity.h:30
void set_light(nngn::Light *l)
Definition entity.cpp:104
Flag
Definition entity.h:25
@ ALIVE
Definition entity.h:26
@ POS_UPDATED
Definition entity.h:26
Entity * parent
Definition entity.h:38
void set_camera(nngn::Camera *p)
Definition entity.cpp:99
bool pos_updated() const
Definition entity.h:40
nngn::Animation * anim
Definition entity.h:35
bool alive() const
Definition entity.h:39
nngn::Light * light
Definition entity.h:37
nngn::vec3 p
Definition entity.h:29
nngn::Collider * collider
Definition entity.h:34
Definition animation.h:44
Abstract orthographic/perspective camera.
Definition camera.h:69
Definition colliders.h:15
Wrapper for a small unsigned integral representing flags.
Definition flags.h:18
constexpr bool is_set(AT a) const
Definition flags.h:45
Definition renderers.h:15
local e
Definition math.lua:4
std::chrono::seconds s
Definition timing.cpp:6