PCL
Point Operators and Functions

Functions

template<typename T >
double pcl::Distance (const GenericPoint< T > &p1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
double pcl::ManhattanDistance (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T1 , typename T2 >
GenericPoint< T1 > pcl::operator* (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
GenericPoint< T > pcl::operator* (const GenericPoint< T > &p1, T d2)
 
template<typename T >
GenericPoint< T > pcl::operator* (T d1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
GenericPoint< T1 > pcl::operator+ (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
GenericPoint< T > pcl::operator+ (const GenericPoint< T > &p1, T d2)
 
template<typename T >
GenericPoint< T > pcl::operator+ (T d1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
GenericPoint< T1 > pcl::operator- (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
GenericPoint< T > pcl::operator- (const GenericPoint< T > &p1, T d2)
 
template<typename T >
GenericPoint< T > pcl::operator- (T d1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
GenericPoint< T1 > pcl::operator/ (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
GenericPoint< T > pcl::operator/ (const GenericPoint< T > &p1, T d2)
 
template<typename T >
GenericPoint< T > pcl::operator/ (T d1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
bool pcl::operator< (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
bool pcl::operator< (const GenericPoint< T > &p1, T d2)
 
template<typename T >
bool pcl::operator< (T d1, const GenericPoint< T > &p2)
 
template<typename T1 , typename T2 >
bool pcl::operator== (const GenericPoint< T1 > &p1, const GenericPoint< T2 > &p2)
 
template<typename T >
bool pcl::operator== (const GenericPoint< T > &p1, T d2)
 
template<typename T >
bool pcl::operator== (T d1, const GenericPoint< T > &p2)
 
template<typename T , typename T1 , typename T2 >
void pcl::Rotate (GenericPoint< T > &p, T1 a, T2 xc, T2 yc)
 
template<typename T , typename T1 , typename T2 >
void pcl::Rotate (GenericPoint< T > &p, T1 a, const GenericPoint< T2 > &c)
 
template<typename T , typename T1 , typename T2 >
void pcl::Rotate (GenericPoint< T > &p, T1 sa, T1 ca, T2 xc, T2 yc)
 
template<typename T , typename T1 , typename T2 >
void pcl::Rotate (GenericPoint< T > &p, T1 sa, T1 ca, const GenericPoint< T2 > &c)
 
template<typename T >
void pcl::Swap (GenericPoint< T > &p1, GenericPoint< T > &p2)
 

Detailed Description

Function Documentation

◆ Distance()

template<typename T >
double pcl::Distance ( const GenericPoint< T > &  p1,
const GenericPoint< T > &  p2 
)
inline

Returns the distance between two points p1 and p2 in the plane.

Definition at line 1291 of file Point.h.

References pcl::Sqrt(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ ManhattanDistance()

template<typename T1 , typename T2 >
double pcl::ManhattanDistance ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Returns the Manhattan distance between two points p1 and p2 in the plane.

Definition at line 1304 of file Point.h.

References pcl::Abs(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator*() [1/3]

template<typename T1 , typename T2 >
GenericPoint<T1> pcl::operator* ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Multiplies two points p1 and p2, and returns the resulting product point.

Point multiplication consists in multiplying homonym coordinates. Given two points p and q in the plane, the product point P = p * q is given by:

P.x = p.x * q.x
P.y = p.y * q.y

Definition at line 1189 of file Point.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator*() [2/3]

template<typename T >
GenericPoint<T> pcl::operator* ( const GenericPoint< T > &  p1,
d2 
)
inline

Multiplies a point p1 by a scalar d2, and returns the resulting product point.

Given a point p in the plane and a scalar d, the product point P = p * d is given by:

P.x = p.x * d
P.y = p.y * d

Definition at line 1207 of file Point.h.

◆ operator*() [3/3]

template<typename T >
GenericPoint<T> pcl::operator* ( d1,
const GenericPoint< T > &  p2 
)
inline

Multiplies a scalar d1 by a point p2, and returns the resulting product point.

Point multiplication is a commutative operation, thus see pcl::operator *( const GenericPoint<T>&, T ).

Definition at line 1222 of file Point.h.

◆ operator+() [1/3]

template<typename T1 , typename T2 >
GenericPoint<T1> pcl::operator+ ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Adds two points p1 and p2, and returns the resulting sum point.

Point addition consists in adding homonym coordinates. Given two points p and q in the plane, the sum point s = p + q is given by:

s.x = p.x + q.x
s.y = p.y + q.y

Definition at line 1084 of file Point.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator+() [2/3]

template<typename T >
GenericPoint<T> pcl::operator+ ( const GenericPoint< T > &  p1,
d2 
)
inline

Adds a point p1 and a scalar d2, and returns the resulting sum point.

Given a point p in the plane and a scalar d, the sum point s = p + d is given by:

s.x = p.x + d
s.y = p.y + d

Definition at line 1101 of file Point.h.

◆ operator+() [3/3]

template<typename T >
GenericPoint<T> pcl::operator+ ( d1,
const GenericPoint< T > &  p2 
)
inline

Adds a scalar d1 and a point p2, and returns the resulting sum point.

Point addition is a commutative operation, thus see pcl::operator +( const GenericPoint<T>&, T ).

Definition at line 1115 of file Point.h.

◆ operator-() [1/3]

template<typename T1 , typename T2 >
GenericPoint<T1> pcl::operator- ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Subtracts two points p1 and p2, and returns the resulting difference point.

Point subtraction consists in subtracting homonym coordinates. Given two points p and q in the plane, the difference point r = p - q is given by:

r.x = p.x - q.x
r.y = p.y - q.y

Definition at line 1134 of file Point.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator-() [2/3]

template<typename T >
GenericPoint<T> pcl::operator- ( const GenericPoint< T > &  p1,
d2 
)
inline

Subtracts a scalar d2 from a point p1, and returns the resulting difference point.

Given a point p in the plane and a scalar d, the difference point r = p - d is given by:

r.x = p.x - d
r.y = p.y - d

Definition at line 1152 of file Point.h.

◆ operator-() [3/3]

template<typename T >
GenericPoint<T> pcl::operator- ( d1,
const GenericPoint< T > &  p2 
)
inline

Subtracts a point p2 from a scalar d1, and returns the resulting difference point.

Given a point p in the plane and a scalar d, the difference point r = d - p is given by:

r.x = d - p.x
r.y = d - p.y

Definition at line 1170 of file Point.h.

◆ operator/() [1/3]

template<typename T1 , typename T2 >
GenericPoint<T1> pcl::operator/ ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Divides two points p1 and p2, and returns the resulting quotient point.

Given two points p and q in the plane, the quotient point Q = p / q is given by:

Q.x = p.x / q.x
Q.y = p.y / q.y

Definition at line 1239 of file Point.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator/() [2/3]

template<typename T >
GenericPoint<T> pcl::operator/ ( const GenericPoint< T > &  p1,
d2 
)
inline

Divides a point p1 by a scalar d2, and returns the resulting quotient point.

Given a point p in the plane and a scalar d, the quotient point Q = p / d is given by:

Q.x = p.x / d
Q.y = p.y / d

Definition at line 1258 of file Point.h.

◆ operator/() [3/3]

template<typename T >
GenericPoint<T> pcl::operator/ ( d1,
const GenericPoint< T > &  p2 
)
inline

Divides a scalar d1 by a point p2, and returns the resulting quotient point.

Given a point p in the plane and a scalar d, the quotient point Q = d / q is given by:

Q.x = d / p.x
Q.y = d / p.y

Definition at line 1277 of file Point.h.

◆ operator<() [1/3]

template<typename T1 , typename T2 >
bool pcl::operator< ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Returns true iff a point p1 is less than another point p2.

Points in the plane are sorted by ordinates in PCL. Given two points p and q in the plane, it holds that:

p < q if p.y < q.y or p.y == q.y and p.x < q.x

Definition at line 1037 of file Point.h.

References pcl::GenericPoint< T >::y.

◆ operator<() [2/3]

template<typename T >
bool pcl::operator< ( const GenericPoint< T > &  p1,
d2 
)
inline

Returns true iff a point p1 is less than a scalar d2.

Given a point p in the plane and a scalar d, it holds that:

p < d if p.y < d or p.y == d and p.x < d

Definition at line 1052 of file Point.h.

◆ operator<() [3/3]

template<typename T >
bool pcl::operator< ( d1,
const GenericPoint< T > &  p2 
)
inline

Returns true iff a scalar d1 is less than a point p2.

Given a point p in the plane and a scalar d, it holds that:

d < p if d < p.y or d == p.y and d < p.x

Definition at line 1067 of file Point.h.

◆ operator==() [1/3]

template<typename T1 , typename T2 >
bool pcl::operator== ( const GenericPoint< T1 > &  p1,
const GenericPoint< T2 > &  p2 
)
inline

Returns true iff two points p1 and p2 are equal. Two points are equal if their homonym coordinates are equal.

Definition at line 999 of file Point.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator==() [2/3]

template<typename T >
bool pcl::operator== ( const GenericPoint< T > &  p1,
d2 
)
inline

Returns true iff a point p1 is equal to a scalar d2. A point is equal to a scalar d if both coordinates of p are equal to d.

Definition at line 1010 of file Point.h.

◆ operator==() [3/3]

template<typename T >
bool pcl::operator== ( d1,
const GenericPoint< T > &  p2 
)
inline

Returns true iff a scalar d1 is equal to a point p2. A scalar d is equal to a point p if both coordinates of p are equal to d.

Definition at line 1021 of file Point.h.

◆ Rotate() [1/4]

template<typename T , typename T1 , typename T2 >
void pcl::Rotate ( GenericPoint< T > &  p,
T1  a,
T2  xc,
T2  yc 
)
inline

Rotates a point in the plane, given a rotation angle and the coordinates of a center of rotation.

Parameters
pReference to a point that will be rotated.
aRotation angle in radians. Positive angles are measured counter-clockwise.
xcAbscissa (x coordinate) of the center of rotation.
ycOrdinate (y coordinate) of the center of rotation.

The coordinates p.x and p.y are replaced by their corresponding rotated values.

Definition at line 1325 of file Point.h.

◆ Rotate() [2/4]

template<typename T , typename T1 , typename T2 >
void pcl::Rotate ( GenericPoint< T > &  p,
T1  a,
const GenericPoint< T2 > &  c 
)
inline

Rotates a point in the plane, given a rotation angle and a rotation center point.

Parameters
pReference to a point that will be rotated.
aRotation angle in radians. Positive angles are measured counter-clockwise.
cReference to a point that will be taken as the center of rotation.

The coordinates p.x and p.y are replaced by their corresponding rotated values.

Definition at line 1346 of file Point.h.

◆ Rotate() [3/4]

template<typename T , typename T1 , typename T2 >
void pcl::Rotate ( GenericPoint< T > &  p,
T1  sa,
T1  ca,
T2  xc,
T2  yc 
)
inline

Rotates a point in the plane, given a rotation angle by its sine and cosine, and the coordinates of a center of rotation.

Parameters
pReference to a point that will be rotated.
saSine of the rotation angle.
caCosine of the rotation angle.
xcAbscissa (x coordinate) of the center of rotation.
ycOrdinate (y coordinate) of the center of rotation.

The coordinates p.x and p.y are replaced by their corresponding rotated values.

Definition at line 1367 of file Point.h.

References pcl::Rotate(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ Rotate() [4/4]

template<typename T , typename T1 , typename T2 >
void pcl::Rotate ( GenericPoint< T > &  p,
T1  sa,
T1  ca,
const GenericPoint< T2 > &  c 
)
inline

Rotates a point in the plane, given a rotation angle by its sine and cosine, and a rotation center point.

Parameters
pReference to a point that will be rotated.
saSine of the rotation angle.
caCosine of the rotation angle.
cReference to a point that will be taken as the center of rotation.

The coordinates p.x and p.y are replaced by their corresponding rotated values.

Definition at line 1388 of file Point.h.

References pcl::Rotate(), pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ Swap()