All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
op::Point< T > Struct Template Reference

`#include <point.hpp>`

## Public Member Functions

| Point (const T x=0, const T y=0)
| Point (const Point< T > &point)
Point< T > & | operator= (const Point< T > &point)
| Point (Point< T > &&point)
Point< T > & | operator= (Point< T > &&point)
T | area () const
std::string | toString () const
bool | operator< (const Point< T > &point) const
bool | operator> (const Point< T > &point) const
bool | operator<= (const Point< T > &point) const
bool | operator>= (const Point< T > &point) const
bool | operator== (const Point< T > &point) const
bool | operator!= (const Point< T > &point) const
Point< T > & | operator+= (const Point< T > &point)
Point< T > | operator+ (const Point< T > &point) const
Point< T > & | operator+= (const T value)
Point< T > | operator+ (const T value) const
Point< T > & | operator-= (const Point< T > &point)
Point< T > | operator- (const Point< T > &point) const
Point< T > & | operator-= (const T value)
Point< T > | operator- (const T value) const
Point< T > & | operator*= (const T value)
Point< T > | operator* (const T value) const
Point< T > & | operator/= (const T value)
Point< T > | operator/ (const T value) const

## Public Attributes

T | x
T | y

## Constructor & Destructor Documentation

template<typename T>

op::Point< T >::Point | ( | const T | x = `0`,
|  | const T | y = `0`
| ) |  |

template<typename T>

op::Point< T >::Point | ( | const Point< T > & | point | ) |

Copy constructor. It performs `fast copy`: For performance purpose, copying a Point<T> or Point<T> or cv::Mat just copies the reference, it still shares the same internal data. Modifying the copied element will modify the original one. Use clone() for a slower but real copy, similarly to cv::Mat and Point<T>.

Parameters

  point | Point to be copied.

template<typename T>

op::Point< T >::Point | ( | Point< T > && | point | ) |

Move constructor. It destroys the original Point to be moved.

Parameters

  point | Point to be moved.

## Member Function Documentation

template<typename T>

T op::Point< T >::area | ( |  | ) | const

inline

template<typename T>

bool op::Point< T >::operator!= | ( | const Point< T > & | point | ) | const

inline

Not equal comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

Point<T> op::Point< T >::operator* | ( | const T | value | ) | const

template<typename T>

Point<T>& op::Point< T >::operator*= | ( | const T | value | ) |

template<typename T>

Point<T> op::Point< T >::operator+ | ( | const Point< T > & | point | ) | const

template<typename T>

Point<T> op::Point< T >::operator+ | ( | const T | value | ) | const

template<typename T>

Point<T>& op::Point< T >::operator+= | ( | const Point< T > & | point | ) |

template<typename T>

Point<T>& op::Point< T >::operator+= | ( | const T | value | ) |

template<typename T>

Point<T> op::Point< T >::operator- | ( | const Point< T > & | point | ) | const

template<typename T>

Point<T> op::Point< T >::operator- | ( | const T | value | ) | const

template<typename T>

Point<T>& op::Point< T >::operator-= | ( | const Point< T > & | point | ) |

template<typename T>

Point<T>& op::Point< T >::operator-= | ( | const T | value | ) |

template<typename T>

Point<T> op::Point< T >::operator/ | ( | const T | value | ) | const

template<typename T>

Point<T>& op::Point< T >::operator/= | ( | const T | value | ) |

template<typename T>

bool op::Point< T >::operator< | ( | const Point< T > & | point | ) | const

inline

Less comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

bool op::Point< T >::operator<= | ( | const Point< T > & | point | ) | const

inline

Less or equal comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

Point<T>& op::Point< T >::operator= | ( | const Point< T > & | point | ) |

Copy assignment. Similar to Point<T>(const Point<T>& point).

Parameters

  point | Point to be copied.

Returns
  The resulting Point.

template<typename T>

Point<T>& op::Point< T >::operator= | ( | Point< T > && | point | ) |

Move assignment. Similar to Point<T>(Point<T>&& point).

Parameters

  point | Point to be moved.

Returns
  The resulting Point.

template<typename T>

bool op::Point< T >::operator== | ( | const Point< T > & | point | ) | const

inline

Equal comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

bool op::Point< T >::operator> | ( | const Point< T > & | point | ) | const

inline

Greater comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

bool op::Point< T >::operator>= | ( | const Point< T > & | point | ) | const

inline

Greater or equal comparison operator.

Parameters

  point | Point<T> to be compared.

Returns
  Whether the instance satisfies the condition with respect to point.

template<typename T>

std::string op::Point< T >::toString | ( |  | ) | const

It returns a string with the whole Point<T> data. Useful for debugging. The format is: `[x, y]`

Returns
  A string with the Point<T> values in the above format.

## Member Data Documentation

template<typename T>

T op::Point< T >::x

template<typename T>

T op::Point< T >::y

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

- /home/travis/build/CMU-Perceptual-Computing-Lab/openpose/include/openpose/core/point.hpp