neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
geometrical.hpp File Reference
#include <neogfx/neogfx.hpp>
#include <array>
#include <type_traits>
#include <ostream>
#include <optional>
#include <neolib/app/i_setting_value.hpp>
#include <neogfx/core/numerical.hpp>
#include <neogfx/core/alignment.hpp>

Go to the source code of this file.

Classes

struct  neogfx::is_gui< logical_coordinate_system >
 
struct  neogfx::is_gui< logical_coordinate_system::AutomaticGui >
 
struct  neogfx::is_game< logical_coordinate_system >
 
struct  neogfx::is_game< logical_coordinate_system::AutomaticGame >
 
struct  neogfx::logical_coordinates
 
class  neogfx::basic_delta< CoordinateType >
 
struct  neogfx::bad_size
 
class  neogfx::basic_size< CoordinateType >
 
class  neogfx::basic_point< CoordinateType >
 
class  neogfx::basic_box_areas< DimensionType >
 
class  neogfx::basic_rect< CoordinateType, CoordinateSystem >
 
class  neogfx::basic_line< CoordinateType >
 

Namespaces

namespace  neogfx
 

Typedefs

typedef scalar neogfx::default_geometry_value_type
 
typedef default_geometry_value_type neogfx::coordinate
 
typedef default_geometry_value_type neogfx::dimension
 
typedef default_geometry_value_type neogfx::coordinate_delta
 
typedef int32_t neogfx::coordinate_i32
 
typedef int32_t neogfx::dimension_i32
 
typedef int32_t neogfx::coordinate_delta_i32
 
typedef uint32_t neogfx::coordinate_u32
 
typedef uint32_t neogfx::dimension_u32
 
typedef uint32_t neogfx::coordinate_delta_u32
 
typedef vec2 neogfx::xy
 
typedef vec3 neogfx::xyz
 
typedef optional< logical_coordinate_systemneogfx::optional_logical_coordinate_system
 
typedef neolib::optional< logical_coordinatesneogfx::optional_logical_coordinates
 
typedef basic_delta< coordinateneogfx::delta
 
typedef basic_size< coordinateneogfx::size
 
typedef basic_point< coordinateneogfx::point
 
typedef basic_box_areas< double > neogfx::box_areas
 
typedef basic_rect< coordinate, logical_coordinate_system::AutomaticGuineogfx::gui_rect
 
typedef basic_rect< coordinate, logical_coordinate_system::AutomaticGameneogfx::game_rect
 
typedef gui_rect neogfx::rect
 
typedef basic_line< coordinateneogfx::line
 
typedef basic_size< int32_t > neogfx::size_i32
 
typedef basic_delta< int32_t > neogfx::delta_i32
 
typedef basic_point< int32_t > neogfx::point_i32
 
typedef basic_rect< int32_t > neogfx::rect_i32
 
typedef basic_size< uint32_t > neogfx::size_u32
 
typedef basic_delta< uint32_t > neogfx::delta_u32
 
typedef basic_point< uint32_t > neogfx::point_u32
 
typedef basic_rect< uint32_t > neogfx::rect_u32
 
template<typename DimensionType >
using neogfx::basic_margin = basic_box_areas< DimensionType >
 
template<typename DimensionType >
using neogfx::basic_border = basic_box_areas< DimensionType >
 
template<typename DimensionType >
using neogfx::basic_padding = basic_box_areas< DimensionType >
 
typedef basic_margin< dimensionneogfx::margin
 
typedef basic_border< dimensionneogfx::border
 
typedef basic_padding< dimensionneogfx::padding
 
typedef optional< dimensionneogfx::optional_dimension
 
typedef optional< angleneogfx::optional_angle
 
typedef optional< deltaneogfx::optional_delta
 
typedef optional< pointneogfx::optional_point
 
typedef optional< sizeneogfx::optional_size
 
typedef optional< rectneogfx::optional_rect
 
typedef optional< delta_u32neogfx::optional_delta_u32
 
typedef optional< point_u32neogfx::optional_point_u32
 
typedef optional< size_u32neogfx::optional_size_u32
 
typedef optional< rect_u32neogfx::optional_rect_u32
 
typedef optional< marginneogfx::optional_margin
 
typedef optional< borderneogfx::optional_border
 
typedef optional< paddingneogfx::optional_padding
 
typedef optional< vector1neogfx::optional_vector1
 
typedef optional< vector2neogfx::optional_vector2
 
typedef optional< vector3neogfx::optional_vector3
 
typedef optional< vector4neogfx::optional_vector4
 

Enumerations

enum class  neogfx::logical_coordinate_system { neogfx::Specified , neogfx::AutomaticGui , neogfx::AutomaticGame }
 

Functions

template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator+ (const basic_delta< CoordinateType > &left, CoordinateType s)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator- (const basic_delta< CoordinateType > &left, CoordinateType s)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator* (const basic_delta< CoordinateType > &left, CoordinateType s)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator/ (const basic_delta< CoordinateType > &left, CoordinateType s)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator+ (const basic_delta< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator- (const basic_delta< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator* (const basic_delta< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator/ (const basic_delta< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
bool neogfx::nearly_equal (basic_delta< CoordinateType > const &lhs, basic_delta< CoordinateType > const &rhs, scalar epsilon=0.00001)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator+ (const basic_size< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator- (const basic_size< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator* (const basic_size< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator/ (const basic_size< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator+ (const basic_size< CoordinateType > &left, typename basic_size< CoordinateType >::dimension_type right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator- (const basic_size< CoordinateType > &left, typename basic_size< CoordinateType >::dimension_type right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator* (const basic_size< CoordinateType > &left, typename basic_size< CoordinateType >::dimension_type right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator/ (const basic_size< CoordinateType > &left, typename basic_size< CoordinateType >::dimension_type right)
 
template<typename CoordinateType >
bool neogfx::nearly_equal (basic_size< CoordinateType > const &lhs, basic_size< CoordinateType > const &rhs, scalar epsilon=0.00001)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator+ (const basic_point< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator- (const basic_point< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator* (const basic_point< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator/ (const basic_point< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator+ (const basic_point< CoordinateType > &left, typename basic_point< CoordinateType >::coordinate_type amount)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator- (const basic_point< CoordinateType > &left, typename basic_point< CoordinateType >::coordinate_type amount)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator* (const basic_point< CoordinateType > &left, typename basic_point< CoordinateType >::coordinate_type amount)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator/ (const basic_point< CoordinateType > &left, typename basic_point< CoordinateType >::coordinate_type amount)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator+ (const basic_point< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator- (const basic_point< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator* (const basic_point< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_delta< CoordinateType > neogfx::operator/ (const basic_point< CoordinateType > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator+ (const basic_point< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator- (const basic_point< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator* (const basic_point< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_point< CoordinateType > neogfx::operator/ (const basic_point< CoordinateType > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator+ (const basic_size< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator- (const basic_size< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator* (const basic_size< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
basic_size< CoordinateType > neogfx::operator/ (const basic_size< CoordinateType > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType >
bool neogfx::nearly_equal (basic_point< CoordinateType > const &lhs, basic_point< CoordinateType > const &rhs, scalar epsilon=0.00001)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator+ (const basic_box_areas< DimensionType > &left, const basic_box_areas< DimensionType > &right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator- (const basic_box_areas< DimensionType > &left, const basic_box_areas< DimensionType > &right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator* (const basic_box_areas< DimensionType > &left, const basic_box_areas< DimensionType > &right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator/ (const basic_box_areas< DimensionType > &left, const basic_box_areas< DimensionType > &right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator+ (const basic_box_areas< DimensionType > &left, typename basic_box_areas< DimensionType >::dimension_type right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator- (const basic_box_areas< DimensionType > &left, typename basic_box_areas< DimensionType >::dimension_type right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator* (const basic_box_areas< DimensionType > &left, typename basic_box_areas< DimensionType >::dimension_type right)
 
template<typename DimensionType >
basic_box_areas< DimensionType > neogfx::operator/ (const basic_box_areas< DimensionType > &left, typename basic_box_areas< DimensionType >::dimension_type right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator* (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator* (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator* (const basic_rect< CoordinateType, CoordinateSystem > &left, typename basic_rect< CoordinateType, CoordinateSystem >::dimension_type value)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator/ (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator/ (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator/ (const basic_rect< CoordinateType, CoordinateSystem > &left, typename basic_rect< CoordinateType, CoordinateSystem >::dimension_type value)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator+ (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator+ (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator+ (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator- (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_point< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator- (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_size< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
basic_rect< CoordinateType, CoordinateSystem > neogfx::operator- (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_delta< CoordinateType > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::operator< (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::operator== (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::operator<= (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::operator> (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::operator>= (const basic_rect< CoordinateType, CoordinateSystem > &left, const basic_rect< CoordinateType, CoordinateSystem > &right)
 
template<typename CoordinateType , logical_coordinate_system CoordinateSystem>
bool neogfx::nearly_equal (basic_rect< CoordinateType, CoordinateSystem > const &lhs, basic_rect< CoordinateType, CoordinateSystem > const &rhs, scalar epsilon=0.00001)
 
template<typename T >
basic_point< T > neogfx::operator* (basic_matrix< T, 3, 3 > const &aTransformation, basic_point< T > const &aPoint)
 
template<typename T >
basic_size< T > neogfx::operator* (basic_matrix< T, 3, 3 > const &aTransformation, basic_size< T > const &aSize)
 
template<typename T >
basic_rect< T > neogfx::operator* (basic_matrix< T, 3, 3 > const &aTransformation, basic_rect< T > const &aRect)
 
template<typename T >
basic_box_areas< T > neogfx::operator* (basic_matrix< T, 3, 3 > const &aTransformation, basic_box_areas< T > const &aBoxAreas)
 
point neogfx::mix (const point &aLhs, const point &aRhs, double aMixValue)
 
vec2 neogfx::mix (const vec2 &aLhs, const vec2 &aRhs, double aMixValue)
 
vec3 neogfx::mix (const vec3 &aLhs, const vec3 &aRhs, double aMixValue)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_point< T > &aPoint)
 
template<typename Elem , typename Traits , typename T >
std::basic_istream< Elem, Traits > & neogfx::operator>> (std::basic_istream< Elem, Traits > &aStream, basic_point< T > &aPoint)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_size< T > &aSize)
 
template<typename Elem , typename Traits , typename T >
std::basic_istream< Elem, Traits > & neogfx::operator>> (std::basic_istream< Elem, Traits > &aStream, basic_size< T > &aSize)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_delta< T > &aDelta)
 
template<typename Elem , typename Traits , typename T >
std::basic_istream< Elem, Traits > & neogfx::operator>> (std::basic_istream< Elem, Traits > &aStream, basic_delta< T > &aDelta)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_rect< T > &aRect)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const basic_box_areas< T > &aBoxAreas)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const neolib::optional< basic_point< T > > &aPoint)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const neolib::optional< basic_size< T > > &aSize)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const neolib::optional< basic_delta< T > > &aDelta)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const neolib::optional< basic_rect< T > > &aBoxAreas)
 
template<typename Elem , typename Traits , typename T >
std::basic_ostream< Elem, Traits > & neogfx::operator<< (std::basic_ostream< Elem, Traits > &aStream, const neolib::optional< basic_box_areas< T > > &aRect)