licornea_tools
Classes | Namespaces | Macros | Typedefs | Functions | Variables
common.h File Reference
#include <cstddef>
#include <cstdint>
#include <string>
#include <stdexcept>
#include <utility>
#include <iostream>
#include <initializer_list>
#include <opencv2/core/core.hpp>

Go to the source code of this file.

Classes

struct  tlz::index_2d
 
struct  tlz::view_index
 

Namespaces

 tlz
 

Macros

#define POINT_CONVERT(__name__, __in__, __out__, __expr__)
 

Typedefs

using tlz::real = double
 
using tlz::byte = std::uint8_t
 
using tlz::vec2 = cv::Vec< real, 2 >
 
using tlz::vec3 = cv::Vec< real, 3 >
 
using tlz::vec4 = cv::Vec< real, 4 >
 
using tlz::mat33 = cv::Matx< real, 3, 3 >
 
using tlz::mat44 = cv::Matx< real, 4, 4 >
 

Functions

vec3 tlz::mul_h (const mat44 &mat, const vec3 &vec)
 
vec2 tlz::mul_h (const mat33 &mat, const vec2 &vec)
 
template<typename In , typename Out , typename Func >
std::vector< Out > tlz::point_vec_conv_tpl (const std::vector< In > &in, Func func)
 
constexpr long double tlz::operator""_deg (long double deg)
 
bool tlz::operator== (const index_2d &a, const index_2d &b)
 
bool tlz::operator!= (const index_2d &a, const index_2d &b)
 
bool tlz::operator< (const index_2d &a, const index_2d &b)
 
bool tlz::operator<= (const index_2d &a, const index_2d &b)
 
bool tlz::operator> (const index_2d &a, const index_2d &b)
 
bool tlz::operator>= (const index_2d &a, const index_2d &b)
 
std::string tlz::encode_view_index (view_index idx)
 
view_index tlz::decode_view_index (const std::string &key)
 
std::ostream & tlz::operator<< (std::ostream &, const view_index &)
 

Variables

constexpr int tlz::enter_keycode = 10
 
constexpr int tlz::escape_keycode = 27
 
constexpr real tlz::pi = 3.14159265358979323846
 
constexpr real tlz::deg_per_rad = 180.0 / pi
 
constexpr real tlz::rad_per_deg = pi / 180.0
 
constexpr real tlz::golden_ratio = 1.61803398874989484820
 

Macro Definition Documentation

#define POINT_CONVERT (   __name__,
  __in__,
  __out__,
  __expr__ 
)
Value:
inline __out__ __name__(const __in__& pt) { \
return __expr__; \
} \
inline std::vector<__out__> __name__(const std::vector<__in__>& pts) { \
return point_vec_conv_tpl<__in__, __out__>(pts, static_cast<__out__(*)(const __in__&)>(&__name__)); \
}

Definition at line 54 of file common.h.