template class cv::Point3_

Overview

Template class for 3D points specified by its coordinates x, y and z. Moreā€¦

#include <types.hpp>

template <typename _Tp>
class Point3_
{
public:
    // typedefs

    typedef _Tp value_type;

    // fields

    _Tp x;
    _Tp y;
    _Tp z;

    // construction

    Point3_();

    Point3_(
        _Tp _x,
        _Tp _y,
        _Tp _z
        );

    Point3_(const Point3_& pt);
    Point3_(const Point_<_Tp>& pt);
    Point3_(const Vec<_Tp, 3>& v);

    // methods

    Point3_
    cross(const Point3_& pt) const;

    double
    ddot(const Point3_& pt) const;

    _Tp
    dot(const Point3_& pt) const;

    template <typename _Tp2>
    operator Point3_< _Tp2 >() const;

    operator Vec< _Tp, 3 >() const;

    Point3_&
    operator=(const Point3_& pt);
};

Detailed Documentation

Template class for 3D points specified by its coordinates x, y and z.

An instance of the class is interchangeable with the C structure CvPoint2D32f. Similarly to Point_, the coordinates of 3D points can be converted to another type. The vector arithmetic and comparison operations are also supported.

The following Point3_ <> aliases are available:

typedef Point3_<int> Point3i;
typedef Point3_<float> Point3f;
typedef Point3_<double> Point3d;

See also:

cv::Point3i, cv::Point3f and cv::Point3d

Methods

Point3_
cross(const Point3_& pt) const

cross product of the 2 3D points

double
ddot(const Point3_& pt) const

dot product computed in double-precision arithmetics

_Tp
dot(const Point3_& pt) const

dot product

template <typename _Tp2>
operator Point3_< _Tp2 >() const

conversion to another data type

operator Vec< _Tp, 3 >() const

conversion to cv::Vec<>