template 2D point class. The class defines a point in 2D space. Data type of the point coordinates is specified as a template parameter. There are a few shorter aliases available for user convenience. See zz::Point, zz::Point2i, zz::Point2f and zz::Point2d. More...
#include <zupply.hpp>
Public Types | |
| typedef _Tp | value_type |
Public Member Functions | |
| Point_ () | |
| Default constructor. | |
| Point_ (_Tp _x, _Tp _y) | |
| Constructor with x and y coordinate. More... | |
| Point_ (const Point_ &pt) | |
| Copy constructor. More... | |
| Point_ & | operator= (const Point_ &pt) |
| Copy operator. More... | |
| template<typename _Tp2 > | |
| operator Point_< _Tp2 > () const | |
| conversion to another data type | |
| _Tp | dot (const Point_ &pt) const |
| dot product More... | |
| double | ddot (const Point_ &pt) const |
| dot product computed in double-precision arithmetics More... | |
| double | cross (const Point_ &pt) const |
| cross-product More... | |
| bool | inside (const Rect_< _Tp > &r) const |
| checks whether the point is inside the specified rectangle More... | |
Public Attributes | |
| _Tp | x |
| _Tp | y |
| the point coordinates | |
Detailed Description
template<typename _Tp>
class zz::Point_< _Tp >
template 2D point class. The class defines a point in 2D space. Data type of the point coordinates is specified as a template parameter. There are a few shorter aliases available for user convenience. See zz::Point, zz::Point2i, zz::Point2f and zz::Point2d.
Constructor & Destructor Documentation
| zz::Point_< _Tp >::Point_ | ( | _Tp | _x, |
| _Tp | _y | ||
| ) |
Constructor with x and y coordinate.
- Parameters
-
_x _y
| zz::Point_< _Tp >::Point_ | ( | const Point_< _Tp > & | pt | ) |
Copy constructor.
- Parameters
-
pt
Member Function Documentation
| double zz::Point_< _Tp >::cross | ( | const Point_< _Tp > & | pt | ) | const |
cross-product
- Parameters
-
pt
- Returns
| double zz::Point_< _Tp >::ddot | ( | const Point_< _Tp > & | pt | ) | const |
dot product computed in double-precision arithmetics
- Parameters
-
pt
- Returns
| _Tp zz::Point_< _Tp >::dot | ( | const Point_< _Tp > & | pt | ) | const |
dot product
- Parameters
-
pt
- Returns
| bool zz::Point_< _Tp >::inside | ( | const Rect_< _Tp > & | r | ) | const |
checks whether the point is inside the specified rectangle
- Parameters
-
r
- Returns
| Point_& zz::Point_< _Tp >::operator= | ( | const Point_< _Tp > & | pt | ) |
Copy operator.
- Parameters
-
pt
- Returns
The documentation for this class was generated from the following file:
1.8.9.1