neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::game Namespace Reference

Namespaces

namespace  shape
 

Classes

class  aabb_octree
 
class  aabb_quadtree
 
class  animated_sprite_2d_archetype
 
class  animated_sprite_archetype
 
struct  animation
 
class  animation_archetype
 
struct  animation_filter
 
struct  animation_frame
 
class  animator
 
struct  box_collider
 
struct  box_collider_2d
 
class  canvas
 
class  collision_detector
 
struct  color
 
class  ecs
 
struct  filter
 
struct  font
 
class  game_world
 
struct  gradient
 
struct  image
 
struct  material
 
struct  mesh
 
struct  mesh_filter
 
struct  mesh_render_cache
 
struct  mesh_renderer
 
struct  outline
 
struct  patch
 
struct  physics
 
struct  rectangle
 
class  renderable_entity_archetype
 
struct  rigid_body
 
class  simple_physics
 
struct  sprite
 
class  sprite_2d_archetype
 
class  sprite_archetype
 
struct  text_mesh
 
struct  texture
 
struct  transformation
 

Typedefs

typedef std::vector< animation_frameanimation_frames
 
typedef vec3u32 face
 
typedef std::vector< facefaces
 
typedef std::vector< patchpatches
 

Enumerations

enum class  collision_detection_cycle : uint32_t {
  None = 0x00000000 , UpdateColliders = 0x00000001 , UpdateTrees = 0x00000002 , DetectCollisions = 0x00000004 ,
  Default = UpdateColliders | UpdateTrees | DetectCollisions , Detect = UpdateTrees | DetectCollisions , Test = UpdateColliders | UpdateTrees
}
 
enum class  cache_state : uint32_t { Invalid = 0x00000000 , Dirty = 0x00000001 , Clean = 0x00000002 }
 

Functions

mesh_filter const & current_animation_frame (animation_filter const &aAnimationFilter)
 
mat44 const & to_transformation_matrix (animation_filter const &aAnimationFilter)
 
constexpr collision_detection_cycle operator| (collision_detection_cycle aLhs, collision_detection_cycle aRhs)
 
constexpr collision_detection_cycle operator& (collision_detection_cycle aLhs, collision_detection_cycle aRhs)
 
bool operator== (const color &lhs, const color &rhs)
 
template<typename... Systems>
std::shared_ptr< ecsmake_ecs (ecs_flags aCreationFlags=ecs_flags::Default)
 
bool batchable (const filter &lhs, const filter &rhs)
 
bool batchable (const gradient &lhs, const gradient &rhs)
 
bool batchable (const material &lhs, const material &rhs)
 
mesh operator* (const mat44 &aLhs, const mesh &aRhs)
 
rect bounding_rect (const vertices &aVertices, const mat44 &aTransformation=mat44::identity())
 
template<typename Container , typename T >
rect bounding_rect (const Container &aVertices, const basic_matrix< T, 4, 4 > &aTransformation=basic_matrix< T, 4, 4 >::identity())
 
rect bounding_rect (const vertices &aVertices, const faces &aFaces, const mat44 &aTransformation=mat44::identity(), vertices::size_type aOffset=0)
 
template<typename Container , typename T >
rect bounding_rect (const Container &aVertices, const faces &aFaces, const basic_matrix< T, 4, 4 > &aTransformation=basic_matrix< T, 4, 4 >::identity(), vertices::size_type aOffset=0)
 
rect bounding_rect (const mesh &aMesh, const mat44 &aTransformation=mat44::identity())
 
faces default_faces (uint32_t aVertexCount, uint32_t aOffset=0u)
 
faces default_faces (const vertices &aVertices, uint32_t aOffset=0u)
 
bool is_render_cache_valid_no_lock (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
bool is_render_cache_dirty_no_lock (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
bool is_render_cache_clean_no_lock (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
void set_render_cache_invalid_no_lock (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
void set_render_cache_dirty_no_lock (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
void set_render_cache_clean_no_lock (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
bool is_render_cache_valid_no_lock (i_ecs const &aEcs, entity_id aEntity)
 
bool is_render_cache_dirty_no_lock (i_ecs const &aEcs, entity_id aEntity)
 
bool is_render_cache_clean_no_lock (i_ecs const &aEcs, entity_id aEntity)
 
void set_render_cache_invalid_no_lock (i_ecs &aEcs, entity_id aEntity)
 
void set_render_cache_dirty_no_lock (i_ecs &aEcs, entity_id aEntity)
 
void set_render_cache_clean_no_lock (i_ecs &aEcs, entity_id aEntity)
 
bool is_render_cache_valid (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
bool is_render_cache_dirty (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
bool is_render_cache_clean (component< game::mesh_render_cache > const &aCache, entity_id aEntity)
 
void set_render_cache_invalid (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
void set_render_cache_dirty (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
void set_render_cache_clean (component< game::mesh_render_cache > &aCache, entity_id aEntity)
 
bool is_render_cache_valid (i_ecs const &aEcs, entity_id aEntity)
 
bool is_render_cache_dirty (i_ecs const &aEcs, entity_id aEntity)
 
bool is_render_cache_clean (i_ecs const &aEcs, entity_id aEntity)
 
void set_render_cache_invalid (i_ecs &aEcs, entity_id aEntity)
 
void set_render_cache_dirty (i_ecs &aEcs, entity_id aEntity)
 
void set_render_cache_clean (i_ecs &aEcs, entity_id aEntity)
 
bool batchable (const mesh_renderer &lhs, const mesh_renderer &rhs)
 
mat44 to_transformation_matrix (const game::rigid_body &aRigidBody, bool aIncludeTranslation=true)
 
bool batchable (const texture &lhs, const texture &rhs)
 

Typedef Documentation

◆ animation_frames

Definition at line 90 of file animation.hpp.

◆ face

Definition at line 35 of file i_ecs.hpp.

◆ faces

typedef std::vector<face> neogfx::game::faces

Definition at line 36 of file i_ecs.hpp.

◆ patches

typedef std::vector<patch> neogfx::game::patches

Definition at line 88 of file patch.hpp.

Enumeration Type Documentation

◆ cache_state

enum class neogfx::game::cache_state : uint32_t
strong
Enumerator
Invalid 
Dirty 
Clean 

Definition at line 30 of file mesh_render_cache.hpp.

◆ collision_detection_cycle

enum class neogfx::game::collision_detection_cycle : uint32_t
strong
Enumerator
None 
UpdateColliders 
UpdateTrees 
DetectCollisions 
Default 
Detect 
Test 

Definition at line 30 of file collision_detector.hpp.

Function Documentation

◆ batchable() [1/5]

bool neogfx::game::batchable ( const filter lhs,
const filter rhs 
)
inline

Definition at line 88 of file filter.hpp.

◆ batchable() [2/5]

bool neogfx::game::batchable ( const gradient lhs,
const gradient rhs 
)
inline

Definition at line 84 of file gradient.hpp.

◆ batchable() [3/5]

bool neogfx::game::batchable ( const material lhs,
const material rhs 
)
inline

Definition at line 111 of file material.hpp.

◆ batchable() [4/5]

bool neogfx::game::batchable ( const mesh_renderer lhs,
const mesh_renderer rhs 
)
inline

Definition at line 122 of file mesh_renderer.hpp.

◆ batchable() [5/5]

bool neogfx::game::batchable ( const texture lhs,
const texture rhs 
)
inline

Definition at line 111 of file texture.hpp.

◆ bounding_rect() [1/5]

template<typename Container , typename T >
rect neogfx::game::bounding_rect ( const Container &  aVertices,
const basic_matrix< T, 4, 4 > &  aTransformation = basic_matrix<T, 4, 4>::identity() 
)
inline

Definition at line 105 of file mesh.hpp.

◆ bounding_rect() [2/5]

template<typename Container , typename T >
rect neogfx::game::bounding_rect ( const Container &  aVertices,
const faces aFaces,
const basic_matrix< T, 4, 4 > &  aTransformation = basic_matrix<T, 4, 4>::identity(),
vertices::size_type  aOffset = 0 
)
inline

Definition at line 143 of file mesh.hpp.

◆ bounding_rect() [3/5]

rect neogfx::game::bounding_rect ( const mesh aMesh,
const mat44 aTransformation = mat44::identity() 
)
inline

Definition at line 163 of file mesh.hpp.

◆ bounding_rect() [4/5]

rect neogfx::game::bounding_rect ( const vertices aVertices,
const faces aFaces,
const mat44 aTransformation = mat44::identity(),
vertices::size_type  aOffset = 0 
)
inline

Definition at line 122 of file mesh.hpp.

◆ bounding_rect() [5/5]

rect neogfx::game::bounding_rect ( const vertices aVertices,
const mat44 aTransformation = mat44::identity() 
)
inline

Definition at line 85 of file mesh.hpp.

◆ current_animation_frame()

mesh_filter const & neogfx::game::current_animation_frame ( animation_filter const &  aAnimationFilter)
inline

Definition at line 106 of file animation_filter.hpp.

◆ default_faces() [1/2]

faces neogfx::game::default_faces ( const vertices aVertices,
uint32_t  aOffset = 0u 
)
inline

Definition at line 176 of file mesh.hpp.

◆ default_faces() [2/2]

faces neogfx::game::default_faces ( uint32_t  aVertexCount,
uint32_t  aOffset = 0u 
)
inline

Definition at line 168 of file mesh.hpp.

◆ is_render_cache_clean() [1/2]

bool neogfx::game::is_render_cache_clean ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 166 of file mesh_render_cache.hpp.

◆ is_render_cache_clean() [2/2]

bool neogfx::game::is_render_cache_clean ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 203 of file mesh_render_cache.hpp.

◆ is_render_cache_clean_no_lock() [1/2]

bool neogfx::game::is_render_cache_clean_no_lock ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 98 of file mesh_render_cache.hpp.

◆ is_render_cache_clean_no_lock() [2/2]

bool neogfx::game::is_render_cache_clean_no_lock ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 134 of file mesh_render_cache.hpp.

◆ is_render_cache_dirty() [1/2]

bool neogfx::game::is_render_cache_dirty ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 160 of file mesh_render_cache.hpp.

◆ is_render_cache_dirty() [2/2]

bool neogfx::game::is_render_cache_dirty ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 198 of file mesh_render_cache.hpp.

◆ is_render_cache_dirty_no_lock() [1/2]

bool neogfx::game::is_render_cache_dirty_no_lock ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 92 of file mesh_render_cache.hpp.

◆ is_render_cache_dirty_no_lock() [2/2]

bool neogfx::game::is_render_cache_dirty_no_lock ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 129 of file mesh_render_cache.hpp.

◆ is_render_cache_valid() [1/2]

bool neogfx::game::is_render_cache_valid ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 154 of file mesh_render_cache.hpp.

◆ is_render_cache_valid() [2/2]

bool neogfx::game::is_render_cache_valid ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 193 of file mesh_render_cache.hpp.

◆ is_render_cache_valid_no_lock() [1/2]

bool neogfx::game::is_render_cache_valid_no_lock ( component< game::mesh_render_cache > const &  aCache,
entity_id  aEntity 
)
inline

Definition at line 86 of file mesh_render_cache.hpp.

◆ is_render_cache_valid_no_lock() [2/2]

bool neogfx::game::is_render_cache_valid_no_lock ( i_ecs const &  aEcs,
entity_id  aEntity 
)
inline

Definition at line 124 of file mesh_render_cache.hpp.

◆ make_ecs()

template<typename... Systems>
std::shared_ptr< ecs > neogfx::game::make_ecs ( ecs_flags  aCreationFlags = ecs_flags::Default)

Definition at line 49 of file ecs.hpp.

◆ operator&()

constexpr collision_detection_cycle neogfx::game::operator& ( collision_detection_cycle  aLhs,
collision_detection_cycle  aRhs 
)
inlineconstexpr

Definition at line 48 of file collision_detector.hpp.

◆ operator*()

mesh neogfx::game::operator* ( const mat44 aLhs,
const mesh aRhs 
)
inline

Definition at line 80 of file mesh.hpp.

◆ operator==()

bool neogfx::game::operator== ( const color lhs,
const color rhs 
)
inline

Definition at line 70 of file color.hpp.

◆ operator|()

constexpr collision_detection_cycle neogfx::game::operator| ( collision_detection_cycle  aLhs,
collision_detection_cycle  aRhs 
)
inlineconstexpr

Definition at line 43 of file collision_detector.hpp.

◆ set_render_cache_clean() [1/2]

void neogfx::game::set_render_cache_clean ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 186 of file mesh_render_cache.hpp.

◆ set_render_cache_clean() [2/2]

void neogfx::game::set_render_cache_clean ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 218 of file mesh_render_cache.hpp.

◆ set_render_cache_clean_no_lock() [1/2]

void neogfx::game::set_render_cache_clean_no_lock ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 117 of file mesh_render_cache.hpp.

◆ set_render_cache_clean_no_lock() [2/2]

void neogfx::game::set_render_cache_clean_no_lock ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 149 of file mesh_render_cache.hpp.

◆ set_render_cache_dirty() [1/2]

void neogfx::game::set_render_cache_dirty ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 179 of file mesh_render_cache.hpp.

◆ set_render_cache_dirty() [2/2]

void neogfx::game::set_render_cache_dirty ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 213 of file mesh_render_cache.hpp.

◆ set_render_cache_dirty_no_lock() [1/2]

void neogfx::game::set_render_cache_dirty_no_lock ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 110 of file mesh_render_cache.hpp.

◆ set_render_cache_dirty_no_lock() [2/2]

void neogfx::game::set_render_cache_dirty_no_lock ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 144 of file mesh_render_cache.hpp.

◆ set_render_cache_invalid() [1/2]

void neogfx::game::set_render_cache_invalid ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 173 of file mesh_render_cache.hpp.

◆ set_render_cache_invalid() [2/2]

void neogfx::game::set_render_cache_invalid ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 208 of file mesh_render_cache.hpp.

◆ set_render_cache_invalid_no_lock() [1/2]

void neogfx::game::set_render_cache_invalid_no_lock ( component< game::mesh_render_cache > &  aCache,
entity_id  aEntity 
)
inline

Definition at line 104 of file mesh_render_cache.hpp.

◆ set_render_cache_invalid_no_lock() [2/2]

void neogfx::game::set_render_cache_invalid_no_lock ( i_ecs aEcs,
entity_id  aEntity 
)
inline

Definition at line 139 of file mesh_render_cache.hpp.

◆ to_transformation_matrix() [1/2]

mat44 const & neogfx::game::to_transformation_matrix ( animation_filter const &  aAnimationFilter)
inline

Definition at line 113 of file animation_filter.hpp.

◆ to_transformation_matrix() [2/2]

mat44 neogfx::game::to_transformation_matrix ( const game::rigid_body aRigidBody,
bool  aIncludeTranslation = true 
)
inline

Definition at line 94 of file rigid_body.hpp.