DxLibEx
point2d.hpp File Reference
Include dependency graph for point2d.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dxle::size_c< T, >
 Template class for 2D sizes specified by its coordinates width and height. More...
 
class  dxle::point_c< T, >
 Template class for 2D points specified by its coordinates x and y. More...
 

Namespaces

 dxle
 
 dxle::detail
 
 std
 

Macros

#define DXLE_TEMP_make_hash(int_t, bit, bit2)
 

Typedefs

typedef point_c< int > dxle::pointi
 
typedef point_c< std::uint8_t > dxle::pointu8i
 
typedef point_c< std::int8_t > dxle::point8i
 
typedef point_c< double > dxle::pointd
 
typedef point_c< float > dxle::pointf
 

Functions

template<typename CharType , typename PointType >
void dxle::detail::ostream_operator_helper (std::basic_ostream< CharType > &os, const CharType *str, const point_c< PointType > &p)
 
template<typename CharType , typename PointType >
void dxle::detail::istream_operator_helper (std::basic_istream< CharType > &is, point_c< PointType > &p)
 
point_c< T1 > T2 DXLE_CONSTEXPR auto dxle::operator+ (const point_c< T1 > &l, const point_c< T2 > &r) DXLE_NOEXCEPT_IF_EXPR(l.x+r.x) -> point_c< decltype(std::declval< std::remove_cv_t< T1 >>()+std::declval< std::remove_cv_t< T2 >>())>
 
point_c< T1 > T2 DXLE_CONSTEXPR auto dxle::operator/ (const point_c< T1 > &l, T2 r) DXLE_NOEXCEPT_IF_EXPR(l.x/r) -> point_c< decltype(std::declval< std::remove_cv_t< T1 >>()/std::declval< std::remove_cv_t< T2 >>())>
 
point_c< T1 > T2 DXLE_CONSTEXPR auto dxle::dot (const point_c< T1 > &p1, const point_c< T2 > &p2) DXLE_NOEXCEPT_IF_EXPR(p1.x *p2.x+p1.y *p2.y) -> decltype(std::declval< std::remove_cv_t< T1 >>() *std::declval< std::remove_cv_t< T2 >>())
 
 std::DXLE_TEMP_make_hash (int, 8, 16)
 
 std::DXLE_TEMP_make_hash (int, 16, 32)
 
 std::DXLE_TEMP_make_hash (int, 32, 64)
 
 std::DXLE_TEMP_make_hash (uint, 8, 16)
 
 std::DXLE_TEMP_make_hash (uint, 16, 32)
 
 std::DXLE_TEMP_make_hash (uint, 32, 64)
 

Variables

point_c< T1 > dxle::T2
 
DXLE_CONSTEXPR double dxle::double
 

Macro Definition Documentation

§ DXLE_TEMP_make_hash

#define DXLE_TEMP_make_hash (   int_t,
  bit,
  bit2 
)
Value:
template <> struct hash<dxle::point_c<int_t##bit##_t>> {\
hash() = default;\
hash(const hash&) = default;\
hash(hash&& other) :hash_run(std::move(other.hash_run)) {}\
~hash() {}\
hash& operator=(const hash& other) { hash_run = other.hash_run; return *this; }\
hash& operator=(hash&& other) { hash_run = std::move(other.hash_run); return *this; }\
size_t operator()(const dxle::point_c<int_t##bit##_t>& key) const { return hash_run((static_cast<int_t##_fast##bit2##_t>(key.x) << bit) | static_cast<int_t##_fast##bit2##_t>(key.y)); }\
private:\
std::hash<int_t##_fast##bit2##_t> hash_run;\
}
value_type y
Definition: point2d.hpp:109
Definition: point2d.hpp:672
Definition: cast_if.hpp:12
value_type x
Definition: point2d.hpp:109
Template class for 2D points specified by its coordinates x and y.
Definition: point2d.hpp:105

Definition at line 675 of file point2d.hpp.