CartoType C++ API 8.2-50-g007fde5ee
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Public Attributes | List of all members
CartoTypeCore::Point Class Reference

#include <cartotype_base.h>

Inheritance diagram for CartoTypeCore::Point:
CartoTypeCore::OutlinePoint

Public Member Functions

constexpr Point () noexcept
 
constexpr Point (int32_t aX, int32_t aY) noexcept
 
constexpr bool operator== (const Point &aPoint) const noexcept
 
constexpr bool operator!= (const Point &aPoint) const noexcept
 
void operator+= (const Point &aPoint) noexcept
 
void operator-= (const Point &aPoint) noexcept
 
constexpr bool operator< (const Point &aPoint) const noexcept
 
constexpr bool operator> (const Point &aPoint) const noexcept
 
constexpr uint64_t ComparisonValue () const noexcept
 

Public Attributes

int32_t X { 0 }
 
int32_t Y { 0 }
 

Detailed Description

A point in two-dimensional space.

Constructor & Destructor Documentation

◆ Point() [1/2]

constexpr CartoTypeCore::Point::Point ( )
inlineconstexprnoexcept

Create a point with coordinates (0,0).

◆ Point() [2/2]

constexpr CartoTypeCore::Point::Point ( int32_t  aX,
int32_t  aY 
)
inlineconstexprnoexcept

Create a point, specifying coordinates.

Member Function Documentation

◆ ComparisonValue()

constexpr uint64_t CartoTypeCore::Point::ComparisonValue ( ) const
inlineconstexprnoexcept

Return a single number which can be used to sort points into order.

◆ operator!=()

constexpr bool CartoTypeCore::Point::operator!= ( const Point aPoint) const
inlineconstexprnoexcept

The inequality operator.

◆ operator+=()

void CartoTypeCore::Point::operator+= ( const Point aPoint)
inlinenoexcept

Offset a point by another point, treated as a positive vector.

◆ operator-=()

void CartoTypeCore::Point::operator-= ( const Point aPoint)
inlinenoexcept

Offset a point by another point, treated as a negative vector.

◆ operator<()

constexpr bool CartoTypeCore::Point::operator< ( const Point aPoint) const
inlineconstexprnoexcept

The less-than operator, ordering points by x coordinate, then y coordinate.

◆ operator==()

constexpr bool CartoTypeCore::Point::operator== ( const Point aPoint) const
inlineconstexprnoexcept

The equality operator.

◆ operator>()

constexpr bool CartoTypeCore::Point::operator> ( const Point aPoint) const
inlineconstexprnoexcept

The greater-than operator, ordering points by x coordinate, then y coordinate.

Member Data Documentation

◆ X

int32_t CartoTypeCore::Point::X { 0 }

The x coordinate.

◆ Y

int32_t CartoTypeCore::Point::Y { 0 }

The y coordinate.


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