neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::basic_size< CoordinateType > Class Template Reference

#include <geometrical.hpp>

Inheritance diagram for neogfx::basic_size< CoordinateType >:
neogfx::basic_rect< CoordinateType, CoordinateSystem >

Public Types

typedef self_type abstract_type
 
typedef CoordinateType coordinate_type
 
typedef CoordinateType dimension_type
 
typedef basic_delta< dimension_typedelta_type
 

Public Member Functions

constexpr basic_size ()
 
template<typename Scalar >
constexpr basic_size (const basic_vector< Scalar, 2 > &other)
 
template<typename Scalar >
constexpr basic_size (const basic_vector< Scalar, 3 > &other)
 
constexpr basic_size (dimension_type cx, dimension_type cy, dimension_type cz={})
 
constexpr basic_size (dimension_type aSquareDimension)
 
template<typename CoordinateType2 >
constexpr basic_size (const basic_size< CoordinateType2 > &other)
 
constexpr basic_size (const basic_delta< CoordinateType > &other)
 
basic_vector< dimension_type, 2 > to_vec2 () const
 
basic_vector< dimension_type, 3 > to_vec3 () const
 
basic_vector< dimension_type, 2 > to_vec2_inf () const
 
basic_vector< dimension_type, 3 > to_vec3_inf () const
 
delta_type to_delta () const
 
bool empty () const
 
auto operator<=> (const basic_size &) const =default
 
basic_size operator- () const
 
basic_sizeoperator+= (const basic_size &other)
 
basic_sizeoperator+= (const basic_delta< CoordinateType > &other)
 
basic_sizeoperator+= (dimension_type amount)
 
basic_sizeoperator-= (const basic_size &other)
 
basic_sizeoperator-= (const basic_delta< CoordinateType > &other)
 
basic_sizeoperator-= (dimension_type amount)
 
basic_sizeoperator*= (const basic_size &other)
 
basic_sizeoperator*= (dimension_type amount)
 
basic_sizeoperator/= (const basic_size &other)
 
basic_sizeoperator/= (dimension_type amount)
 
basic_size ceil () const
 
basic_size floor () const
 
basic_size round () const
 
basic_size min (const basic_size &other) const
 
basic_size max (const basic_size &other) const
 
bool less_than (const basic_size &other) const
 
bool less_than_or_equal (const basic_size &other) const
 
bool greater_than (const basic_size &other) const
 
bool greater_than_or_equal (const basic_size &other) const
 
dimension_type magnitude () const
 
basic_size with_cx (dimension_type d) const
 
basic_size with_cy (dimension_type d) const
 
basic_size with_cz (dimension_type d) const
 
basic_size aspect_ratio () const
 
basic_size with_aspect_ratio_min (const basic_size &aspectRatio) const
 
basic_size with_aspect_ratio_max (const basic_size &aspectRatio) const
 
template<typename T >
basic_size< T > as () const
 
bool cx_inf () const
 
bool cy_inf () const
 
bool cz_inf () const
 

Static Public Member Functions

static constexpr dimension_type max_dimension ()
 
static constexpr basic_size max_size ()
 

Public Attributes

dimension_type cx
 
dimension_type cy
 
dimension_type cz
 

Detailed Description

template<typename CoordinateType>
class neogfx::basic_size< CoordinateType >

Definition at line 234 of file geometrical.hpp.

Member Typedef Documentation

◆ abstract_type

template<typename CoordinateType >
typedef self_type neogfx::basic_size< CoordinateType >::abstract_type

Definition at line 239 of file geometrical.hpp.

◆ coordinate_type

template<typename CoordinateType >
typedef CoordinateType neogfx::basic_size< CoordinateType >::coordinate_type

Definition at line 240 of file geometrical.hpp.

◆ delta_type

template<typename CoordinateType >
typedef basic_delta<dimension_type> neogfx::basic_size< CoordinateType >::delta_type

Definition at line 242 of file geometrical.hpp.

◆ dimension_type

template<typename CoordinateType >
typedef CoordinateType neogfx::basic_size< CoordinateType >::dimension_type

Definition at line 241 of file geometrical.hpp.

Constructor & Destructor Documentation

◆ basic_size() [1/7]

template<typename CoordinateType >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( )
inlineconstexpr

Definition at line 245 of file geometrical.hpp.

◆ basic_size() [2/7]

template<typename CoordinateType >
template<typename Scalar >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( const basic_vector< Scalar, 2 > &  other)
inlineconstexpr

Definition at line 247 of file geometrical.hpp.

◆ basic_size() [3/7]

template<typename CoordinateType >
template<typename Scalar >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( const basic_vector< Scalar, 3 > &  other)
inlineconstexpr

Definition at line 249 of file geometrical.hpp.

◆ basic_size() [4/7]

template<typename CoordinateType >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( dimension_type  cx,
dimension_type  cy,
dimension_type  cz = {} 
)
inlineconstexpr

Definition at line 250 of file geometrical.hpp.

◆ basic_size() [5/7]

template<typename CoordinateType >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( dimension_type  aSquareDimension)
inlineexplicitconstexpr

Definition at line 251 of file geometrical.hpp.

◆ basic_size() [6/7]

template<typename CoordinateType >
template<typename CoordinateType2 >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( const basic_size< CoordinateType2 > &  other)
inlineconstexpr

Definition at line 253 of file geometrical.hpp.

◆ basic_size() [7/7]

template<typename CoordinateType >
constexpr neogfx::basic_size< CoordinateType >::basic_size ( const basic_delta< CoordinateType > &  other)
inlineconstexpr

Definition at line 255 of file geometrical.hpp.

Member Function Documentation

◆ as()

template<typename CoordinateType >
template<typename T >
basic_size< T > neogfx::basic_size< CoordinateType >::as ( ) const
inline

Definition at line 294 of file geometrical.hpp.

◆ aspect_ratio()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::aspect_ratio ( ) const
inline

Definition at line 289 of file geometrical.hpp.

◆ ceil()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::ceil ( ) const
inline

Definition at line 276 of file geometrical.hpp.

◆ cx_inf()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::cx_inf ( ) const
inline

Definition at line 299 of file geometrical.hpp.

◆ cy_inf()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::cy_inf ( ) const
inline

Definition at line 300 of file geometrical.hpp.

◆ cz_inf()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::cz_inf ( ) const
inline

Definition at line 301 of file geometrical.hpp.

◆ empty()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::empty ( ) const
inline

Definition at line 263 of file geometrical.hpp.

◆ floor()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::floor ( ) const
inline

Definition at line 277 of file geometrical.hpp.

◆ greater_than()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::greater_than ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 283 of file geometrical.hpp.

◆ greater_than_or_equal()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::greater_than_or_equal ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 284 of file geometrical.hpp.

◆ less_than()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::less_than ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 281 of file geometrical.hpp.

◆ less_than_or_equal()

template<typename CoordinateType >
bool neogfx::basic_size< CoordinateType >::less_than_or_equal ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 282 of file geometrical.hpp.

◆ magnitude()

template<typename CoordinateType >
dimension_type neogfx::basic_size< CoordinateType >::magnitude ( ) const
inline

Definition at line 285 of file geometrical.hpp.

◆ max()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::max ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 280 of file geometrical.hpp.

◆ max_dimension()

template<typename CoordinateType >
static constexpr dimension_type neogfx::basic_size< CoordinateType >::max_dimension ( )
inlinestaticconstexpr

Definition at line 306 of file geometrical.hpp.

◆ max_size()

template<typename CoordinateType >
static constexpr basic_size neogfx::basic_size< CoordinateType >::max_size ( )
inlinestaticconstexpr

Definition at line 307 of file geometrical.hpp.

◆ min()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::min ( const basic_size< CoordinateType > &  other) const
inline

Definition at line 279 of file geometrical.hpp.

◆ operator*=() [1/2]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator*= ( const basic_size< CoordinateType > &  other)
inline

Definition at line 272 of file geometrical.hpp.

◆ operator*=() [2/2]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator*= ( dimension_type  amount)
inline

Definition at line 273 of file geometrical.hpp.

◆ operator+=() [1/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator+= ( const basic_delta< CoordinateType > &  other)
inline

Definition at line 267 of file geometrical.hpp.

◆ operator+=() [2/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator+= ( const basic_size< CoordinateType > &  other)
inline

Definition at line 266 of file geometrical.hpp.

◆ operator+=() [3/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator+= ( dimension_type  amount)
inline

Definition at line 268 of file geometrical.hpp.

◆ operator-()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::operator- ( ) const
inline

Definition at line 265 of file geometrical.hpp.

◆ operator-=() [1/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator-= ( const basic_delta< CoordinateType > &  other)
inline

Definition at line 270 of file geometrical.hpp.

◆ operator-=() [2/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator-= ( const basic_size< CoordinateType > &  other)
inline

Definition at line 269 of file geometrical.hpp.

◆ operator-=() [3/3]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator-= ( dimension_type  amount)
inline

Definition at line 271 of file geometrical.hpp.

◆ operator/=() [1/2]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator/= ( const basic_size< CoordinateType > &  other)
inline

Definition at line 274 of file geometrical.hpp.

◆ operator/=() [2/2]

template<typename CoordinateType >
basic_size & neogfx::basic_size< CoordinateType >::operator/= ( dimension_type  amount)
inline

Definition at line 275 of file geometrical.hpp.

◆ operator<=>()

template<typename CoordinateType >
auto neogfx::basic_size< CoordinateType >::operator<=> ( const basic_size< CoordinateType > &  ) const
default

◆ round()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::round ( ) const
inline

Definition at line 278 of file geometrical.hpp.

◆ to_delta()

template<typename CoordinateType >
delta_type neogfx::basic_size< CoordinateType >::to_delta ( ) const
inline

Definition at line 262 of file geometrical.hpp.

◆ to_vec2()

template<typename CoordinateType >
basic_vector< dimension_type, 2 > neogfx::basic_size< CoordinateType >::to_vec2 ( ) const
inline

Definition at line 258 of file geometrical.hpp.

◆ to_vec2_inf()

template<typename CoordinateType >
basic_vector< dimension_type, 2 > neogfx::basic_size< CoordinateType >::to_vec2_inf ( ) const
inline

Definition at line 260 of file geometrical.hpp.

◆ to_vec3()

template<typename CoordinateType >
basic_vector< dimension_type, 3 > neogfx::basic_size< CoordinateType >::to_vec3 ( ) const
inline

Definition at line 259 of file geometrical.hpp.

◆ to_vec3_inf()

template<typename CoordinateType >
basic_vector< dimension_type, 3 > neogfx::basic_size< CoordinateType >::to_vec3_inf ( ) const
inline

Definition at line 261 of file geometrical.hpp.

◆ with_aspect_ratio_max()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::with_aspect_ratio_max ( const basic_size< CoordinateType > &  aspectRatio) const
inline

Definition at line 291 of file geometrical.hpp.

◆ with_aspect_ratio_min()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::with_aspect_ratio_min ( const basic_size< CoordinateType > &  aspectRatio) const
inline

Definition at line 290 of file geometrical.hpp.

◆ with_cx()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::with_cx ( dimension_type  d) const
inline

Definition at line 286 of file geometrical.hpp.

◆ with_cy()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::with_cy ( dimension_type  d) const
inline

Definition at line 287 of file geometrical.hpp.

◆ with_cz()

template<typename CoordinateType >
basic_size neogfx::basic_size< CoordinateType >::with_cz ( dimension_type  d) const
inline

Definition at line 288 of file geometrical.hpp.

Member Data Documentation

◆ cx

template<typename CoordinateType >
dimension_type neogfx::basic_size< CoordinateType >::cx

Definition at line 310 of file geometrical.hpp.

◆ cy

template<typename CoordinateType >
dimension_type neogfx::basic_size< CoordinateType >::cy

Definition at line 311 of file geometrical.hpp.

◆ cz

template<typename CoordinateType >
dimension_type neogfx::basic_size< CoordinateType >::cz

Definition at line 312 of file geometrical.hpp.


The documentation for this class was generated from the following file: