nomlib
Loading...
Searching...
No Matches
nom::Point2< T > Struct Template Reference

2D point container More...

#include <Point2.hpp>

Public Member Functions

 Point2 (void)
 Default constructor; initialize values to Point2<T>::null.
 ~Point2 (void)
 Destructor.
 Point2 (T x, T y)
 Constructor variant for initializing x, y at construction.
template<typename U>
 Point2 (const Point2< U > &copy)
 Copy constructor.
const Point2< T > & get (void) const
 Obtain a reference of the object.

Public Attributes

x
 Represents the X-axis coordinate point.
y
 Represents the Y-axis coordinate point.

Static Public Attributes

static const Point2 null
 Null value.
static const Point2 zero
 Zero value constant.

Detailed Description

template<typename T>
struct nom::Point2< T >

2D point container

Definition at line 43 of file Point2.hpp.

Constructor & Destructor Documentation

◆ Point2() [1/3]

template<typename T>
nom::Point2< T >::Point2 ( void )
inline

Default constructor; initialize values to Point2<T>::null.

Definition at line 46 of file Point2.hpp.

◆ ~Point2()

template<typename T>
nom::Point2< T >::~Point2 ( void )
inline

Destructor.

Definition at line 54 of file Point2.hpp.

◆ Point2() [2/3]

template<typename T>
nom::Point2< T >::Point2 ( T x,
T y )
inline

Constructor variant for initializing x, y at construction.

Definition at line 60 of file Point2.hpp.

◆ Point2() [3/3]

template<typename T>
template<typename U>
nom::Point2< T >::Point2 ( const Point2< U > & copy)
inlineexplicit

Copy constructor.

Remarks
The explicit keyword here will result in compile-time errors in any instance that it finds incompatible casting occurring, such as if you try to down-cast a Point2<int> to a Point2<float>.

Definition at line 73 of file Point2.hpp.

Member Function Documentation

◆ get()

template<typename T>
const Point2< T > & nom::Point2< T >::get ( void ) const
inline

Obtain a reference of the object.

Definition at line 81 of file Point2.hpp.

Member Data Documentation

◆ null

template<typename T>
const Point2 nom::Point2< T >::null
static

Null value.

Remarks
Null value implementation depends on signed (negative) numbers.

Definition at line 89 of file Point2.hpp.

◆ x

template<typename T>
T nom::Point2< T >::x

Represents the X-axis coordinate point.

Definition at line 95 of file Point2.hpp.

◆ y

template<typename T>
T nom::Point2< T >::y

Represents the Y-axis coordinate point.

Definition at line 98 of file Point2.hpp.

◆ zero

template<typename T>
const Point2 nom::Point2< T >::zero
static

Zero value constant.

Definition at line 92 of file Point2.hpp.


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