TheAtlasEngine
 
Loading...
Searching...
No Matches
atlas Namespace Referenceexport

This drivers.cppm will contain API-agnostic implementation that may be widely implemented differently. More...

Namespaces

namespace  tag
 specialized namespace tag to use for specifying operations used with flecs in using tags
 

Classes

class  application
 represents a single application that gets created by the engine internally More...
 
struct  application_settings
 application properties settings for the window More...
 
struct  box_collider
 
struct  capsule_collider
 
class  console_log_manager
 logger for logging messages to stdout on the console More...
 
struct  directional_light
 
class  game_object
 Creates a pointer wrapper which extends capabilities of flecs::entity. More...
 
class  graphics_context
 
struct  joystick_button
 
struct  joystick_info
 
struct  material_metadata
 
struct  math_generic
 generics to specialize to their mathematical definition of matrices types More...
 
struct  matrix2
 
struct  matrix3
 
struct  matrix4
 
struct  mesh_source
 Loads a mesh source. More...
 
struct  perspective_camera
 define a game object to have a perspective camera that can correspond to it More...
 
struct  physics_body
 physics body data-driven representative More...
 
struct  point_light
 
struct  projection_view
 TODO: Consider either relocating where this is and how it gets handled. More...
 
class  renderer_system
 is an interface that defines a graphics APi-agnostic renderer More...
 
class  scene
 Constructs a scene that defines an area where game objects are part of contained within an atlas::world. More...
 
class  serializer
 serializer is responsible for saving/loading scenes More...
 
struct  sphere_collider
 
struct  surface_properties
 
class  system_registry
 system registry acts as a utility for managing creation of game worlds initially More...
 
struct  transform
 
struct  vector2
 vector2<T> is to define as a centralized mathematical representation of types such as glm::vec2, but can be defined based to the needs of specific mathematical types. More...
 
struct  vector2< glm::highp_vec2 >
 
struct  vector3
 vector3<T> is to define a centralized wrapper as a mathematical representaiton for communicating vector3 types from frameworks to glm::vec3 More...
 
struct  vector3< glm::highp_vec3 >
 
struct  vector3< JPH::Vec3 >
 
struct  vector4
 vector4<T> is to define a centralized wrapper as a mathematical representaiton for communicating vector3 types from frameworks to glm::vec3 More...
 
struct  vector4< glm::highp_vec4 >
 
class  window
 
struct  window_params
 
class  world
 world represents a larger scope of areas that manages the scene contexts More...
 

Typedefs

template<typename T >
using atlas::ref = std::shared_ptr< T >
 alias to atlas::memory::strong_ptr<T>
 
template<typename T >
using atlas::scope = std::unique_ptr< T >
 alias to std::unique_ptr<T>
 
template<size_t Size, typename T >
using atlas::vec = math_generic< glm::vec< Size, T > >
 By default we use the glm math types therefore we create all of our default math types to glm's mathematical type.
 
using atlas::vec2 = vector2< glm::vec2 >
 
using atlas::vec3 = vector3< glm::vec3 >
 
using atlas::vec4 = vector4< glm::vec4 >
 
using atlas::highp_vec2 = vector2< glm::highp_vec2 >
 
using atlas::highp_vec3 = vector3< glm::highp_vec3 >
 
using atlas::highp_vec4 = vector4< glm::highp_vec4 >
 
template<size_t C, size_t R, typename T >
using atlas::mat = math_generic< glm::mat< C, R, T > >
 
using atlas::mat2 = matrix2< glm::mat2 >
 
using atlas::mat3 = matrix3< glm::mat3 >
 
using atlas::mat4 = matrix4< glm::mat4 >
 
using atlas::game_object_optional = std::optional< game_object >
 Alias to std::optional<game_object>
 

Enumerations

enum class  graphics_api : uint8_t { vulkan , dx11 , fx12 , undefined }
 
enum  body_type : uint8_t { fixed = 0 , kinematic = 1 , dynamic = 2 , bodynum }
 static is represented as fixed
 
enum  body_layer : uint8_t { non_moving = 0 , moving = 1 , layer_num }
 
enum  activation : uint8_t { activate , deactivate }
 

Functions

template<typename T , typename... Args>
constexpr ref< T > atlas::create_ref (Args &&... args)
 construct std::make_shared<T>(...);
 
template<typename T , typename... Args>
constexpr scope< T > atlas::create_scope (Args &&... args)
 construct std::make_unique<T>(...);
 
glm::quat atlas::to_quat (const glm::vec4 &p_values)
 converts vec4 to quaterion
 
glm::highp_vec4 atlas::from_quat (const glm::vec3 &p_values)
 converts vec3 to quaterion
 
glm::quat atlas::to_quat (const glm::vec3 &p_values)
 converts glm::vec3 to glm::vec4
 
glm::quat atlas::to_quathp (const glm::highp_vec4 &p_values)
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_out, const glm::highp_vec2 &p_values)
 from yaml-cpp, saving glm::highp_vec2 values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_out, const glm::highp_vec3 &p_values)
 from yaml-cpp, saving glm::highp_vec3 values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_out, const glm::highp_vec4 &p_values)
 from yaml-cpp, saving glm::highp_vec4 values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const transform *p_transform)
 from yaml-cpp, saving transform values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const perspective_camera *p_camera)
 from yaml-cpp, saving perspective_camera values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const mesh_source *p_material)
 from yaml-cpp, saving mesh_source values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const point_light *p_material)
 from yaml-cpp, saving mesh_source values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const physics_body *p_body)
 from yaml-cpp, saving physics_body values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const box_collider *p_body)
 from yaml-cpp, saving box_collider values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const sphere_collider *p_body)
 from yaml-cpp, saving sphere_collider values to disk
 
YAML::Emitter & atlas::operator<< (YAML::Emitter &p_output, const capsule_collider *p_body)
 from yaml-cpp, saving capsule_collider values to disk
 
void atlas::poll_update (void *p_address, const std::function< void(float)> &p_callback)
 
void atlas::poll_defer_update (void *p_address, const std::function< void()> &p_callback)
 
void atlas::poll_physics_update (void *p_address, const std::function< void()> &p_callback)
 
void atlas::poll_ui_update (void *p_address, const std::function< void()> &p_callback)
 
void atlas::poll_start (void *p_address, const std::function< void()> &p_callback)
 
void atlas::remove_update (void *p_address)
 
void atlas::remove_defer_update (void *p_address)
 
void atlas::remove_physics_update (void *p_address)
 
void atlas::remove_ui_update (void *p_address)
 
void atlas::remove_start (void *p_address)
 
void atlas::invoke_on_update (float p_delta_time)
 detail namespace is used for any internals that should not be accessed by the user
 
void atlas::invoke_defer_update ()
 
void atlas::invoke_physics_update ()
 
void atlas::invoke_ui_update ()
 
void atlas::invoke_start ()
 
template<typename UObject , typename UCallback >
void atlas::register_start (UObject *p_instance, const UCallback &p_callable)
 preloading any behavior that may be required of the users game objects, such as pre-loading assets or any metadata after construction of the objects. During engine's preloading stage.
 
template<typename UObject , typename UCallback >
void atlas::register_update (UObject *p_instance, const UCallback &p_callable)
 Used for executing user-defined game logic during every framerate.
 
template<typename UObject , typename UCallback >
void atlas::register_physics (UObject *p_instance, const UCallback &p_callable)
 Primarily used for executing physics game logic during the physics fixed framerate.
 
template<typename UObject , typename UCallback >
void atlas::register_deferred (UObject *p_instance, const UCallback &p_callable)
 Intended to be used to specify game logic to be executed at the last possible moment in your game.
 
template<typename UObject , typename UCallback >
void atlas::register_ui (UObject *p_instance, const UCallback &p_callable)
 This is just for registering UI logic for handling editorial UI logic such as widgets modification to entity transform components.
 
ref< windowatlas::initialize_window (ref< graphics_context > p_context, const window_params &p_params, graphics_api p_api)
 constructs an atlas::window
 
glm::quat atlas::to_quat (const JPH::Quat &p_values)
 
glm::vec3 atlas::to_vec3 (const JPH::Vec3 &p_values)
 
glm::vec4 atlas::to_vec4 (const JPH::Quat &p_values)
 
template<typename T , typename... Rest>
void atlas::hash_combine (size_t &seed, const T &v, const Rest &... rest)
 
ref< graphics_contextatlas::initialize_context (const std::string &p_name, graphics_api p_api)
 construct a new graphics context and initializes that API
 
ref< renderer_systematlas::initialize_renderer (ref< graphics_context > p_context, graphics_api p_api, const window_params &p_window_extent, uint32_t p_image_size, const std::string &p_name)
 

Variables

std::unordered_map< void *, std::function< void(float)> > atlas::s_update {}
 
std::unordered_map< void *, std::function< void()> > atlas::s_defer_update {}
 
std::unordered_map< void *, std::function< void()> > atlas::s_ui_update {}
 
std::unordered_map< void *, std::function< void()> > atlas::s_physica_update {}
 
std::unordered_map< void *, std::function< void()> > atlas::s_start {}
 

event.hpp

Note
Actual input polling system to poll in differeny sets of key/mouse actions
Parameters
UpdateEventshandles making sure that all of our events we handle have been successfully updated.
GetMousePosjust returns the position of our mouse cursor
enum  input_state { None , Idle , Pressed , Released }
 
using atlas::button_id = int
 
using atlas::controller_id = int
 

Detailed Description

This drivers.cppm will contain API-agnostic implementation that may be widely implemented differently.

Such as Window contexts, graphics API-agnostic implementation, renderers, etc.

Typedef Documentation

◆ game_object_optional

using atlas::game_object_optional = typedef std::optional<game_object>
export

Alias to std::optional<game_object>

This alias serves as a representation of game objects users can create and manage components with

◆ ref

template<typename T >
using atlas::ref = typedef std::shared_ptr<T>
export

alias to atlas::memory::strong_ptr<T>

alias to memory::optional_ptr<T>

alias to std::shared_ptr<T>

Enumeration Type Documentation

◆ body_layer

enum atlas::body_layer : uint8_t
export
Parameters
non_movingis used for static objects that saves for not using the collider component
movingis used for dynamic, kinematic, and character objects that will be used

Function Documentation

◆ create_ref()

template<typename T , typename... Args>
constexpr ref< T > atlas::create_ref ( Args &&...  args)
constexprexport

construct std::make_shared<T>(...);

Template Parameters
...Argsis a template pack for packing in parameters
Tis the type of object to construct strong_ptr with
Parameters
...Argsis an argument pack for packing to deduce the types that is specified by object of type T

◆ create_scope()

template<typename T , typename... Args>
constexpr scope< T > atlas::create_scope ( Args &&...  args)
constexprexport

construct std::make_unique<T>(...);

Template Parameters
...Argsis a template pack for packing in parameters
Tis the type of object to construct strong_ptr with
Parameters
...Argsis an argument pack for packing to deduce the types that is specified by object of type T

◆ initialize_context()

ref< graphics_context > atlas::initialize_context ( const std::string &  p_name,
graphics_api  p_api 
)
export

construct a new graphics context and initializes that API

Returns
shared_ptr<graphics_context>

◆ initialize_window()

ref< window > atlas::initialize_window ( ref< graphics_context p_context,
const window_params p_params,
graphics_api  p_api 
)
export

constructs an atlas::window

There should only ever be one window constructed throughout the entire application

Parameters
p_settingsis the window settings to construct the window with
Returns
shared_ptr<atlas::window>

◆ invoke_on_update()

void atlas::invoke_on_update ( float  p_delta_time)
export

detail namespace is used for any internals that should not be accessed by the user

Note
When switching to C++'s modules, hopefully this removes the needs for having to represent namespaces in this way.

Any invoke_* function is an internal detail that handles where those behaviorial state callbacks get handled into their respective state queue's

Where the state queue will call those arbitrary callbacks at their respective point in each of the frame.

As thesse are intended for invoking those queue's directly.

◆ register_deferred()

template<typename UObject , typename UCallback >
void atlas::register_deferred ( UObject *  p_instance,
const UCallback &  p_callable 
)
export

Intended to be used to specify game logic to be executed at the last possible moment in your game.

Intended to be used for game object logic that needs to be resolved at the last-moment in the frame.

Template Parameters
UObjectis the specific object to point to the specified callback
UCallbackis the arbitrary type of the callback that contains the game logic itself
Parameters
p_instanceis a pointer that points where the callback is coming from
p_callableis the callback of arbitrary logic that then gets executed and is used alongside p_instance

Example Usage:

++
atlas::register_deferred(this, &level_scene::late_update);

◆ register_physics()

template<typename UObject , typename UCallback >
void atlas::register_physics ( UObject *  p_instance,
const UCallback &  p_callable 
)
export

Primarily used for executing physics game logic during the physics fixed framerate.

This API rather allows for explicit control over where to execute your callback to the physics fixed framerate

Template Parameters
UObjectis the specific object to point to the specified callback
UCallbackis the arbitrary type of the callback that contains the game logic itself
Parameters
p_instanceis a pointer that points where the callback is coming from
p_callableis the callback of arbitrary logic that then gets executed and is used alongside p_instance

Example Usage:

++
atlas::register_physics(this, &level_scene::on_physics);

◆ register_start()

template<typename UObject , typename UCallback >
void atlas::register_start ( UObject *  p_instance,
const UCallback &  p_callable 
)
export

preloading any behavior that may be required of the users game objects, such as pre-loading assets or any metadata after construction of the objects. During engine's preloading stage.

This is very useful for spawning or not initiating any pre-load logic that does not happen during the construction of your object itself

Ideally I would like to expand this to allow for level transitioning of pointing to start registration for transitioning various preloading logic

Template Parameters
UObjectis the specific object to point to the specified callback
UCallbackis the arbitrary type of the callback that contains the game logic itself
Parameters
p_instanceis a pointer that points where the callback is coming from
p_callableis the callback of arbitrary logic that then gets executed and is used alongside p_instance

Example Usage:

++
atlas::register_start(this, &level_scene::preload);

◆ register_ui()

template<typename UObject , typename UCallback >
void atlas::register_ui ( UObject *  p_instance,
const UCallback &  p_callable 
)
export

This is just for registering UI logic for handling editorial UI logic such as widgets modification to entity transform components.

Intended for containing logic widgets may be used in.

TODO: This might be redundant and may actually consider either removing this or simplify by just using register_deferred instead.

Template Parameters
UObjectis the specific object to point to the specified callback
UCallbackis the arbitrary type of the callback that contains the game logic itself
Parameters
p_instanceis a pointer that points where the callback is coming from
p_callableis the callback of arbitrary logic that then gets executed and is used alongside p_instance

Example Usage:

++
atlas::register_ui(this, &level_scene::late_update);

◆ register_update()

template<typename UObject , typename UCallback >
void atlas::register_update ( UObject *  p_instance,
const UCallback &  p_callable 
)
export

Used for executing user-defined game logic during every framerate.

This API allows you to register your game logic to be executed during every frame call.

This is useful for any kind of game logic that is related to game inputs.

Template Parameters
UObjectis the specific object to point to the specified callback
UCallbackis the arbitrary type of the callback that contains the game logic itself
Parameters
p_instanceis a pointer that points where the callback is coming from
p_callableis the callback of arbitrary logic that then gets executed and is used alongside p_instance

Example Usage:

++
atlas::register_update(this, &level_scene::update_logic);