Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub
Point< T > Struct Template Reference

The Point structure defines the x- and y-coordinates of a point. More...

Public Types

typedef T Type
 

Public Member Functions

 Point ()
 
template<typename TX , typename TY >
 Point (TX tx, TY ty)
 
template<class TP , template< class > class TPoint>
 Point (const TPoint< TP > &p)
 
template<class TS >
 Point (const cv::Size_< TS > &size)
 
 ~Point ()
 
template<class TP , template< class > class TPoint>
 operator TPoint< TP > () const
 
template<typename TP >
Pointoperator= (const Point< TP > &p)
 
template<typename TP >
Pointoperator+= (const Point< TP > &p)
 
template<typename TP >
Pointoperator-= (const Point< TP > &p)
 
template<typename TA >
Pointoperator*= (const TA &a)
 
Pointoperator/= (double a)
 
Point operator<< (ptrdiff_t shift) const
 
Point operator>> (ptrdiff_t shift) const
 

Data Fields

x
 Specifies the x-coordinate of a point.
 
y
 Specifies the y-coordinate of a point.
 

Detailed Description

template<typename T>
struct Simd::Point< T >

The Point structure defines the x- and y-coordinates of a point.

Related Functions.

Member Typedef Documentation

typedef T Type

Type definition.

Constructor & Destructor Documentation

SIMD_INLINE Point ( )

Creates a new Point structure that contains the default (0, 0) coordinates.

Point ( TX  tx,
TY  ty 
)

Creates a new Point structure that contains the specified coordinates.

Parameters
[in]tx- initial X value.
[in]ty- initial Y value.
Point ( const TPoint< TP > &  p)

Creates a new Point structure on the base of another point of arbitrary type.

Parameters
[in]p- a point of arbitrary type.
Point ( const cv::Size_< TS > &  size)

Creates a new Point structure on the base of OpenCV size type.

Note
You have to define SIMD_OPENCV_ENABLE in order to use this functionality.
Parameters
[in]size- an OpenCV size.
SIMD_INLINE ~Point ( )

A point destructor.

Member Function Documentation

operator TPoint< TP > ( ) const

Converts itself to point of arbitrary type.

Returns
a point of arbitrary type.
Point& operator= ( const Point< TP > &  p)

Performs copying from point of arbitrary type.

Parameters
[in]p- a point of arbitrary type.
Returns
a reference to itself.
Point& operator+= ( const Point< TP > &  p)

Adds to itself point of arbitrary type.

Parameters
[in]p- a point of arbitrary type.
Returns
a reference to itself.
Point& operator-= ( const Point< TP > &  p)

Subtracts from itself point of arbitrary type.

Parameters
[in]p- a point of arbitrary type.
Returns
a reference to itself.
Point& operator*= ( const TA &  a)

Multiplies itself by value of arbitrary type.

Parameters
[in]a- a factor of arbitrary type.
Returns
a reference to itself.
SIMD_INLINE Point< T > & operator/= ( double  a)

Divides itself into given value.

Parameters
[in]a- a value of divider.
Returns
a reference to itself.
SIMD_INLINE Point< T > operator<< ( ptrdiff_t  shift) const

Performs shift bit left for value of point coordinates.

Note
It function is actual for integer types of Point.
Parameters
[in]shift- a shift value.
Returns
a new point with shifted coordinates.
SIMD_INLINE Point< T > operator>> ( ptrdiff_t  shift) const

Performs shift bit right for value of point coordinates.

Note
It function is actual for integer types of Point.
Parameters
[in]shift- a shift value.
Returns
a new point with shifted coordinates.