The Battle for Wesnoth  1.17.8+dev
Public Member Functions | List of all members
point Struct Reference

Holds a 2D point. More...

#include <point.hpp>

Inheritance diagram for point:

Public Member Functions

 point ()
 Initialize to 0 by default. More...
 
 point (int x, int y)
 
 point (const SDL_Point &p)
 
bool operator== (const point &point) const
 
bool operator!= (const point &point) const
 
bool operator< (const point &point) const
 
bool operator<= (const point &point) const
 
point operator+ (const point &point) const
 
pointoperator+= (const point &point)
 
point operator- (const point &point) const
 
pointoperator-= (const point &point)
 
point operator* (int s) const
 
pointoperator*= (int s)
 
point operator/ (int s) const
 
pointoperator/= (int s)
 
point operator* (const point &p) const
 
pointoperator*= (const point &p)
 
point operator/ (const point &p) const
 
pointoperator/= (const point &p)
 

Detailed Description

Holds a 2D point.

This is a thin wrapper over SDL_Point.

Definition at line 24 of file point.hpp.

Constructor & Destructor Documentation

◆ point() [1/3]

point::point ( )
inline

Initialize to 0 by default.

Definition at line 27 of file point.hpp.

◆ point() [2/3]

point::point ( int  x,
int  y 
)
inline

Definition at line 29 of file point.hpp.

◆ point() [3/3]

point::point ( const SDL_Point &  p)
inline

Definition at line 31 of file point.hpp.

Member Function Documentation

◆ operator!=()

bool point::operator!= ( const point point) const
inline

Definition at line 38 of file point.hpp.

References operator==().

◆ operator*() [1/2]

point point::operator* ( int  s) const
inline

Definition at line 77 of file point.hpp.

References s.

◆ operator*() [2/2]

point point::operator* ( const point p) const
inline

Definition at line 103 of file point.hpp.

◆ operator*=() [1/2]

point& point::operator*= ( int  s)
inline

Definition at line 82 of file point.hpp.

References s.

◆ operator*=() [2/2]

point& point::operator*= ( const point p)
inline

Definition at line 108 of file point.hpp.

◆ operator+()

point point::operator+ ( const point point) const
inline

Definition at line 53 of file point.hpp.

◆ operator+=()

point& point::operator+= ( const point point)
inline

Definition at line 58 of file point.hpp.

◆ operator-()

point point::operator- ( const point point) const
inline

Definition at line 65 of file point.hpp.

◆ operator-=()

point& point::operator-= ( const point point)
inline

Definition at line 70 of file point.hpp.

◆ operator/() [1/2]

point point::operator/ ( int  s) const
inline

Definition at line 89 of file point.hpp.

References s.

◆ operator/() [2/2]

point point::operator/ ( const point p) const
inline

Definition at line 115 of file point.hpp.

◆ operator/=() [1/2]

point& point::operator/= ( int  s)
inline

Definition at line 94 of file point.hpp.

References s.

◆ operator/=() [2/2]

point& point::operator/= ( const point p)
inline

Definition at line 120 of file point.hpp.

References operator<<().

◆ operator<()

bool point::operator< ( const point point) const
inline

Definition at line 43 of file point.hpp.

◆ operator<=()

bool point::operator<= ( const point point) const
inline

Definition at line 48 of file point.hpp.

◆ operator==()

bool point::operator== ( const point point) const
inline

Definition at line 33 of file point.hpp.

Referenced by operator!=().


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