Symphony Of Empires
utils.hpp File Reference
#include <cstdint>
#include <cstring>
#include <bit>
#include <concepts>
#include <iomanip>
#include <algorithm>
#include <glm/common.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/intersect.hpp>
Include dependency graph for utils.hpp:

Go to the source code of this file.

Classes

class  Range< It >
 

Namespaces

 std
 
 Eng3D
 

Macros

#define CXX_THROW(class, ...)   throw class(__VA_ARGS__);
 

Enumerations

enum class  std::endian { std::little = __ORDER_LITTLE_ENDIAN__ , std::big = __ORDER_BIG_ENDIAN__ , std::native = __BYTE_ORDER__ }
 

Functions

template<class To , class From >
std::enable_if_t< sizeof(To)==sizeof(From) &&std::is_trivially_copyable_v< From > &&std::is_trivially_copyable_v< To >, To > std::bit_cast (const From &src) noexcept
 
template<typename T >
constexpr T std::byteswap (T value) noexcept
 
template<typename ORange , typename OIt = decltype(std::begin(std::declval<ORange>())), typename It = std::reverse_iterator<OIt>>
Range< It > reverse (ORange &&originalRange)
 
template<typename C , typename T >
void Eng3D::fast_erase (C &c, T value) noexcept
 
template<typename C , typename T >
void Eng3D::fast_erase_all (C &c, T value) noexcept
 
glm::vec3 Eng3D::get_sphere_coord (glm::vec2 size, glm::vec2 pos, float radius)
 
float Eng3D::euclidean_distance (glm::vec2 size, float radius, glm::vec2 p0, glm::vec2 p1)
 Obtain the euclidean distance from p0 to p1. More...
 

Macro Definition Documentation

◆ CXX_THROW

#define CXX_THROW (   class,
  ... 
)    throw class(__VA_ARGS__);

Definition at line 98 of file utils.hpp.

Function Documentation

◆ reverse()

template<typename ORange , typename OIt = decltype(std::begin(std::declval<ORange>())), typename It = std::reverse_iterator<OIt>>
Range<It> reverse ( ORange &&  originalRange)

Definition at line 115 of file utils.hpp.

Here is the caller graph for this function: