Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
impl.hpp
Go to the documentation of this file.
1
6#pragma once
7
8namespace flecs {
9
10inline ecs_ftime_t world::frame_begin(ecs_ftime_t delta_time) const {
12}
13
14inline void world::frame_end() const {
16}
17
18inline void world::run_post_frame(
19 ecs_fini_action_t action,
20 void *ctx) const
21{
22 ecs_run_post_frame(world_, action, ctx);
23}
24
25inline void world::quit() const {
27}
28
29inline bool world::should_quit() const {
30 return ecs_should_quit(world_);
31}
32
33inline void world::set_time_scale(ecs_ftime_t mul) const {
35}
36
37inline void world::set_target_fps(ecs_ftime_t target_fps) const {
38 ecs_set_target_fps(world_, target_fps);
39}
40
41inline void world::reset_clock() const {
43}
44
45}
FLECS_API void ecs_set_time_scale(ecs_world_t *world, ecs_ftime_t scale)
Set time scale.
FLECS_API ecs_ftime_t ecs_frame_begin(ecs_world_t *world, ecs_ftime_t delta_time)
Begin frame.
FLECS_API void ecs_frame_end(ecs_world_t *world)
End frame.
FLECS_API void ecs_quit(ecs_world_t *world)
Signal exit.
FLECS_API void ecs_run_post_frame(ecs_world_t *world, ecs_fini_action_t action, void *ctx)
Register an action to be executed once after the frame.
FLECS_API void ecs_reset_clock(ecs_world_t *world)
Reset world clock.
FLECS_API bool ecs_should_quit(const ecs_world_t *world)
Return whether a quit has been requested.
FLECS_API void ecs_set_target_fps(ecs_world_t *world, ecs_ftime_t fps)
Set target frames per second (FPS) for an application.
void set_target_fps(ecs_ftime_t target_fps) const
Set the target FPS.
void frame_end() const
End frame.
void reset_clock() const
Reset the simulation clock.
void quit() const
Signal application should quit.
void set_time_scale(ecs_ftime_t mul) const
Set the time scale.
ecs_ftime_t frame_begin(ecs_ftime_t delta_time=0) const
Begin frame.
void run_post_frame(ecs_fini_action_t action, void *ctx) const
Run callback after completing the frame.
bool should_quit() const
Test if quit() has been called.
void(* ecs_fini_action_t)(ecs_world_t *world, void *ctx)
Action callback on world exit.
Definition flecs.h:653
#define ecs_ftime_t
Customizable precision for scalar time values.
Definition flecs.h:59
world_t * world_
Pointer to the underlying C world.
Definition world.hpp:1423
ecs_ftime_t delta_time() const
Get delta_time.
Definition world.hpp:1296