OpenCV453
|
Template class for 2D points specified by its coordinates x
and y
.
[詳解]
#include <types.hpp>
公開型 | |
typedef _Tp | value_type |
公開メンバ関数 | |
Point_ () | |
default constructor | |
Point_ (_Tp _x, _Tp _y) | |
Point_ (const Point_ &pt) | |
Point_ (Point_ &&pt) CV_NOEXCEPT | |
Point_ (const Size_< _Tp > &sz) | |
Point_ (const Vec< _Tp, 2 > &v) | |
Point_ & | operator= (const Point_ &pt) |
Point_ & | operator= (Point_ &&pt) CV_NOEXCEPT |
template<typename _Tp2 > | |
operator Point_< _Tp2 > () const | |
conversion to another data type | |
operator Vec< _Tp, 2 > () const | |
conversion to the old-style C structures | |
_Tp | dot (const Point_ &pt) const |
dot product | |
double | ddot (const Point_ &pt) const |
dot product computed in double-precision arithmetics | |
double | cross (const Point_ &pt) const |
cross-product | |
bool | inside (const Rect_< _Tp > &r) const |
checks whether the point is inside the specified rectangle | |
公開変数類 | |
_Tp | x |
x coordinate of the point | |
_Tp | y |
y coordinate of the point | |
Template class for 2D points specified by its coordinates x
and y
.
An instance of the class is interchangeable with C structures, CvPoint and CvPoint2D32f . There is also a cast operator to convert point coordinates to the specified type. The conversion from floating-point coordinates to integer coordinates is done by rounding. Commonly, the conversion uses this operation for each of the coordinates. Besides the class members listed in the declaration above, the following operations on points are implemented:
For your convenience, the following type aliases are defined:
Example: