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

#include <geometrical.hpp>

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

Public Types

typedef self_type abstract_type
 
typedef CoordinateType coordinate_type
 

Public Member Functions

constexpr basic_point ()
 
template<typename Scalar >
constexpr basic_point (const basic_vector< Scalar, 2 > &other)
 
template<typename Scalar >
constexpr basic_point (const basic_vector< Scalar, 3 > &other)
 
constexpr basic_point (CoordinateType x, CoordinateType y, CoordinateType z={})
 
template<typename CoordinateType2 >
constexpr basic_point (const basic_point< CoordinateType2 > &other)
 
constexpr basic_point (const basic_delta< CoordinateType > &other)
 
constexpr basic_point (const basic_size< CoordinateType > &other)
 
basic_delta< coordinate_typeto_delta () const
 
basic_size< coordinate_typeto_size () const
 
basic_vector< coordinate_type, 2 > to_vec2 () const
 
basic_vector< coordinate_type, 3 > to_vec3 () const
 
 operator basic_delta< coordinate_type > () const
 
 operator basic_size< coordinate_type > () const
 
auto operator<=> (const basic_point &) const =default
 
basic_pointoperator+= (const basic_point &other)
 
basic_pointoperator-= (const basic_point &other)
 
basic_pointoperator*= (const basic_point &other)
 
basic_pointoperator/= (const basic_point &other)
 
basic_pointoperator+= (coordinate_type amount)
 
basic_pointoperator-= (coordinate_type amount)
 
basic_pointoperator*= (coordinate_type amount)
 
basic_pointoperator/= (coordinate_type amount)
 
basic_pointoperator+= (const basic_delta< coordinate_type > &other)
 
basic_pointoperator-= (const basic_delta< coordinate_type > &other)
 
basic_pointoperator+= (const basic_size< coordinate_type > &other)
 
basic_pointoperator-= (const basic_size< coordinate_type > &other)
 
basic_point operator- () const
 
basic_point abs () const
 
basic_point ceil () const
 
basic_point floor () const
 
basic_point round () const
 
basic_point min (const basic_point &other) const
 
basic_point max (const basic_point &other) const
 
basic_point min_max (const basic_point &other) const
 
basic_point max_min (const basic_point &other) const
 
basic_point mid (const basic_point &other) const
 
basic_point with_x (coordinate_type x0) const
 
basic_point with_y (coordinate_type y0) const
 
basic_point with_z (coordinate_type z0) const
 
coordinate_type magnitude () const
 
template<typename T >
basic_point< T > as () const
 

Public Attributes

coordinate_type x
 
coordinate_type y
 
coordinate_type z
 

Detailed Description

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

Definition at line 389 of file geometrical.hpp.

Member Typedef Documentation

◆ abstract_type

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

Definition at line 394 of file geometrical.hpp.

◆ coordinate_type

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

Definition at line 395 of file geometrical.hpp.

Constructor & Destructor Documentation

◆ basic_point() [1/7]

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

Definition at line 398 of file geometrical.hpp.

◆ basic_point() [2/7]

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

Definition at line 400 of file geometrical.hpp.

◆ basic_point() [3/7]

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

Definition at line 405 of file geometrical.hpp.

◆ basic_point() [4/7]

template<typename CoordinateType >
constexpr neogfx::basic_point< CoordinateType >::basic_point ( CoordinateType  x,
CoordinateType  y,
CoordinateType  z = {} 
)
inlineconstexpr

Definition at line 409 of file geometrical.hpp.

◆ basic_point() [5/7]

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

Definition at line 412 of file geometrical.hpp.

◆ basic_point() [6/7]

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

Definition at line 416 of file geometrical.hpp.

◆ basic_point() [7/7]

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

Definition at line 418 of file geometrical.hpp.

Member Function Documentation

◆ abs()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::abs ( ) const
inline

Definition at line 442 of file geometrical.hpp.

◆ as()

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

Definition at line 456 of file geometrical.hpp.

◆ ceil()

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

Definition at line 443 of file geometrical.hpp.

◆ floor()

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

Definition at line 444 of file geometrical.hpp.

◆ magnitude()

template<typename CoordinateType >
coordinate_type neogfx::basic_point< CoordinateType >::magnitude ( ) const
inline

Definition at line 454 of file geometrical.hpp.

◆ max()

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

Definition at line 447 of file geometrical.hpp.

◆ max_min()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::max_min ( const basic_point< CoordinateType > &  other) const
inline

Definition at line 449 of file geometrical.hpp.

◆ mid()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::mid ( const basic_point< CoordinateType > &  other) const
inline

Definition at line 450 of file geometrical.hpp.

◆ min()

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

Definition at line 446 of file geometrical.hpp.

◆ min_max()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::min_max ( const basic_point< CoordinateType > &  other) const
inline

Definition at line 448 of file geometrical.hpp.

◆ operator basic_delta< coordinate_type >()

template<typename CoordinateType >
neogfx::basic_point< CoordinateType >::operator basic_delta< coordinate_type > ( ) const
inlineexplicit

Definition at line 426 of file geometrical.hpp.

◆ operator basic_size< coordinate_type >()

template<typename CoordinateType >
neogfx::basic_point< CoordinateType >::operator basic_size< coordinate_type > ( ) const
inlineexplicit

Definition at line 427 of file geometrical.hpp.

◆ operator*=() [1/2]

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

Definition at line 431 of file geometrical.hpp.

◆ operator*=() [2/2]

template<typename CoordinateType >
basic_point & neogfx::basic_point< CoordinateType >::operator*= ( coordinate_type  amount)
inline

Definition at line 435 of file geometrical.hpp.

◆ operator+=() [1/4]

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

Definition at line 437 of file geometrical.hpp.

◆ operator+=() [2/4]

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

Definition at line 429 of file geometrical.hpp.

◆ operator+=() [3/4]

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

Definition at line 439 of file geometrical.hpp.

◆ operator+=() [4/4]

template<typename CoordinateType >
basic_point & neogfx::basic_point< CoordinateType >::operator+= ( coordinate_type  amount)
inline

Definition at line 433 of file geometrical.hpp.

◆ operator-()

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

Definition at line 441 of file geometrical.hpp.

◆ operator-=() [1/4]

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

Definition at line 438 of file geometrical.hpp.

◆ operator-=() [2/4]

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

Definition at line 430 of file geometrical.hpp.

◆ operator-=() [3/4]

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

Definition at line 440 of file geometrical.hpp.

◆ operator-=() [4/4]

template<typename CoordinateType >
basic_point & neogfx::basic_point< CoordinateType >::operator-= ( coordinate_type  amount)
inline

Definition at line 434 of file geometrical.hpp.

◆ operator/=() [1/2]

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

Definition at line 432 of file geometrical.hpp.

◆ operator/=() [2/2]

template<typename CoordinateType >
basic_point & neogfx::basic_point< CoordinateType >::operator/= ( coordinate_type  amount)
inline

Definition at line 436 of file geometrical.hpp.

◆ operator<=>()

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

◆ round()

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

Definition at line 445 of file geometrical.hpp.

◆ to_delta()

template<typename CoordinateType >
basic_delta< coordinate_type > neogfx::basic_point< CoordinateType >::to_delta ( ) const
inline

Definition at line 422 of file geometrical.hpp.

◆ to_size()

template<typename CoordinateType >
basic_size< coordinate_type > neogfx::basic_point< CoordinateType >::to_size ( ) const
inline

Definition at line 423 of file geometrical.hpp.

◆ to_vec2()

template<typename CoordinateType >
basic_vector< coordinate_type, 2 > neogfx::basic_point< CoordinateType >::to_vec2 ( ) const
inline

Definition at line 424 of file geometrical.hpp.

◆ to_vec3()

template<typename CoordinateType >
basic_vector< coordinate_type, 3 > neogfx::basic_point< CoordinateType >::to_vec3 ( ) const
inline

Definition at line 425 of file geometrical.hpp.

◆ with_x()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::with_x ( coordinate_type  x0) const
inline

Definition at line 451 of file geometrical.hpp.

◆ with_y()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::with_y ( coordinate_type  y0) const
inline

Definition at line 452 of file geometrical.hpp.

◆ with_z()

template<typename CoordinateType >
basic_point neogfx::basic_point< CoordinateType >::with_z ( coordinate_type  z0) const
inline

Definition at line 453 of file geometrical.hpp.

Member Data Documentation

◆ x

template<typename CoordinateType >
coordinate_type neogfx::basic_point< CoordinateType >::x

Definition at line 462 of file geometrical.hpp.

◆ y

template<typename CoordinateType >
coordinate_type neogfx::basic_point< CoordinateType >::y

Definition at line 463 of file geometrical.hpp.

◆ z

template<typename CoordinateType >
coordinate_type neogfx::basic_point< CoordinateType >::z

Definition at line 464 of file geometrical.hpp.


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