PCL
Point Operators and Functions

Functions

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

Detailed Description

Function Documentation

◆ Distance()

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

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

Definition at line 1348 of file Point.h.

References pcl::Sqrt().

◆ ManhattanDistance()

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

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

Definition at line 1361 of file Point.h.

References pcl::Abs().

◆ operator*() [1/3]

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

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 1264 of file Point.h.

◆ operator*() [2/3]

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

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 1246 of file Point.h.

◆ operator*() [3/3]

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

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 1279 of file Point.h.

◆ operator+() [1/3]

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

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 1158 of file Point.h.

◆ operator+() [2/3]

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

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 1141 of file Point.h.

◆ operator+() [3/3]

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

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 1172 of file Point.h.

◆ operator-() [1/3]

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

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 1209 of file Point.h.

◆ operator-() [2/3]

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

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 1191 of file Point.h.

◆ operator-() [3/3]

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

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 1227 of file Point.h.

◆ operator/() [1/3]

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

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 1315 of file Point.h.

◆ operator/() [2/3]

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

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 1296 of file Point.h.

◆ operator/() [3/3]

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

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 1334 of file Point.h.

◆ operator<() [1/3]

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

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 1109 of file Point.h.

◆ operator<() [2/3]

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

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 1094 of file Point.h.

◆ operator<() [3/3]

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

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 1124 of file Point.h.

◆ operator==() [1/3]

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

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 1067 of file Point.h.

◆ operator==() [2/3]

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

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

Definition at line 1056 of file Point.h.

◆ operator==() [3/3]

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

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 1078 of file Point.h.

◆ Rotate() [1/4]

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

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 1403 of file Point.h.

◆ Rotate() [2/4]

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

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 1382 of file Point.h.

◆ Rotate() [3/4]

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

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 1445 of file Point.h.

References pcl::Rotate().

◆ Rotate() [4/4]

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

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 1424 of file Point.h.

References pcl::Rotate().

◆ Swap()

pcl::Swap
void Swap(GenericPoint< T > &p1, GenericPoint< T > &p2) noexcept
Definition: Point.h:1459