PCL
Rectangle Operators and Functions

Functions

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

Detailed Description

Function Documentation

◆ operator*() [1/5]

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

Multiplies a point p1 by a rectangle r2, and returns the resulting product rectangle.

Rectangle multiplication is a commutative operation, thus see pcl::operator *( const GenericRectangle<T1>&, const GenericPoint<T2>& ).

Definition at line 2965 of file Rectangle.h.

◆ operator*() [2/5]

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

Multiplies a rectangle r1 by a scalar d2, and returns the resulting product rectangle.

Given a rectangle r and a scalar d, the product rectangle P = r * d is given by:

P.x0 = r1.x0 * d
P.y0 = r1.y0 * d
P.x1 = r1.x1 * d
P.y1 = r1.y1 * d

Definition at line 2986 of file Rectangle.h.

◆ operator*() [3/5]

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

Multiplies a rectangle r1 by a point p2, and returns the resulting product rectangle.

Given a rectangle r and a point p, the product rectangle P = r * p is given by:

P.x0 = r1.x0 * p.x
P.y0 = r1.y0 * p.y
P.x1 = r1.x1 * p.x
P.y1 = r1.y1 * p.y

Definition at line 2949 of file Rectangle.h.

◆ operator*() [4/5]

template<typename T1 , typename T2 >
GenericRectangle<T1> pcl::operator* ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Multiplies two rectangles r1 and r2, and returns the resulting product rectangle.

Rectangle multiplication consists in multiplying homonym coordinates. Given two rectangles r1 and r2, the product rectangle P = r1 * r2 is given by:

P.x0 = r1.x0 * r2.x0
P.y0 = r1.y0 * r2.y0
P.x1 = r1.x1 * r2.x1
P.y1 = r1.y1 * r2.y1

Definition at line 2928 of file Rectangle.h.

◆ operator*() [5/5]

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

Multiplies a scalar d1 by a rectangle r2, and returns the resulting product rectangle.

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

Definition at line 3001 of file Rectangle.h.

◆ operator+() [1/5]

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

Adds a point p1 and a rectangle r2, and returns the resulting sum rectangle.

Rectangle addition is a commutative operation, thus see pcl::operator +( const GenericRectangle<T1>&, const GenericPoint<T2>& ).

Definition at line 2767 of file Rectangle.h.

◆ operator+() [2/5]

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

Adds a rectangle r1 and a scalar d2, and returns the resulting sum rectangle.

Given a rectangle r and a scalar d, the sum rectangle s = r + d is given by:

s.x0 = r.x0 + d
s.y0 = r.y0 + d
s.x1 = r.x1 + d
s.y1 = r.y1 + d

Definition at line 2788 of file Rectangle.h.

◆ operator+() [3/5]

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

Adds a rectangle r1 and a point p2, and returns the resulting sum rectangle.

Given a rectangle r and a point p, the sum rectangle s = r + p is given by:

s.x0 = r.x0 + p.x
s.y0 = r.y0 + p.y
s.x1 = r.x1 + p.x
s.y1 = r.y1 + p.y

Definition at line 2751 of file Rectangle.h.

◆ operator+() [4/5]

template<typename T1 , typename T2 >
GenericRectangle<T1> pcl::operator+ ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Adds two rectangles r1 and r2, and returns the resulting sum rectangle.

Rectangle addition consists in adding homonym coordinates. Given two rectangles r1 and r2, the sum rectangle s = r1 + r2 is given by:

s.x0 = r1.x0 + r2.x0
s.y0 = r1.y0 + r2.y0
s.x1 = r1.x1 + r2.x1
s.y1 = r1.y1 + r2.y1

Definition at line 2730 of file Rectangle.h.

◆ operator+() [5/5]

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

Adds a scalar d1 and a rectangle r2, and returns the resulting sum rectangle.

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

Definition at line 2803 of file Rectangle.h.

◆ operator-() [1/5]

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

Subtracts a rectangle r2 from a point p1, and returns the resulting difference rectangle.

Given a rectangle r and a point p, the difference rectangle s = p - r is given by:

s.x0 = p.x - r.x0
s.y0 = p.y - r.y0
s.x1 = p.x - r.x1
s.y1 = p.y - r.y1

Definition at line 2866 of file Rectangle.h.

◆ operator-() [2/5]

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

Subtracts a scalar d2 from a rectangle r1, and returns the resulting difference rectangle.

Given a rectangle r and a scalar d, the difference rectangle s = r - d is given by:

s.x0 = r.x0 - d
s.y0 = r.y0 - d
s.x1 = r.x1 - d
s.y1 = r.y1 - d

Definition at line 2887 of file Rectangle.h.

◆ operator-() [3/5]

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

Subtracts a point p2 from a rectangle r1, and returns the resulting difference rectangle.

Given a rectangle r and a point p, the difference rectangle s = r - p is given by:

s.x0 = r.x0 - p.x
s.y0 = r.y0 - p.y
s.x1 = r.x1 - p.x
s.y1 = r.y1 - p.y

Definition at line 2845 of file Rectangle.h.

◆ operator-() [4/5]

template<typename T1 , typename T2 >
GenericRectangle<T1> pcl::operator- ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Subtracts two rectangles r1 and r2, and returns the resulting difference rectangle.

Rectangle subtraction consists in subtracting homonym coordinates. Given two rectangles r1 and r2, the difference rectangle s = r1 - r2 is given by:

s.x0 = r1.x0 - r2.x0
s.y0 = r1.y0 - r2.y0
s.x1 = r1.x1 - r2.x1
s.y1 = r1.y1 - r2.y1

Definition at line 2824 of file Rectangle.h.

◆ operator-() [5/5]

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

Subtracts a rectangle r2 from a scalar d1, and returns the resulting difference rectangle.

Given a rectangle r and a scalar d, the difference rectangle s = d - r is given by:

s.x0 = d - r.x0
s.y0 = d - r.y0
s.x1 = d - r.x1
s.y1 = d - r.y1

Definition at line 2907 of file Rectangle.h.

◆ operator/() [1/5]

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

Divides a point p1 by a rectangle r2, and returns the resulting quotient rectangle.

Given a rectangle r and a point p, the quotient rectangle Q = p / r is given by:

Q.x0 = p.x / r.x0
Q.y0 = p.y / r.y0
Q.x1 = p.x / r.x1
Q.y1 = p.y / r.y1

Definition at line 3067 of file Rectangle.h.

◆ operator/() [2/5]

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

Divides a rectangle r1 by a scalar d2, and returns the resulting quotient rectangle.

Given a rectangle r and a scalar d, the quotient rectangle Q = r / d is given by:

Q.x0 = r.x0 / d
Q.y0 = r.y0 / d
Q.x1 = r.x1 / d
Q.y1 = r.y1 / d

Definition at line 3090 of file Rectangle.h.

◆ operator/() [3/5]

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

Divides a rectangle r1 by a point p2, and returns the resulting quotient rectangle.

Given a rectangle r and a point p, the quotient rectangle Q = r / p is given by:

Q.x0 = r.x0 / p.x
Q.y0 = r.y0 / p.y
Q.x1 = r.x1 / p.x
Q.y1 = r.y1 / p.y

Definition at line 3045 of file Rectangle.h.

◆ operator/() [4/5]

template<typename T1 , typename T2 >
GenericRectangle<T1> pcl::operator/ ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Divides two rectangles r1 and r2, and returns the resulting quotient rectangle.

Rectangle division consists in dividing homonym coordinates. Given two rectangles r1 and r2, the quotient rectangle Q = r1 / r2 is given by:

Q.x0 = r1.x0 / r2.x0
Q.y0 = r1.y0 / r2.y0
Q.x1 = r1.x1 / r2.x1
Q.y1 = r1.y1 / r2.y1

Definition at line 3022 of file Rectangle.h.

◆ operator/() [5/5]

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

Divides a scalar d1 by a rectangle r2, and returns the resulting quotient rectangle.

Given a rectangle r and a scalar d, the quotient rectangle Q = d / r is given by:

Q.x0 = d / r.x0
Q.y0 = d / r.y0
Q.x1 = d / r.x1
Q.y1 = d / r.y1

Definition at line 3111 of file Rectangle.h.

◆ operator<()

template<typename T1 , typename T2 >
bool pcl::operator< ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Returns true iff a rectangle r1 is less than another rectangle r2. For rectangle comparisons, vertical coordinates have precedence over horizontal coordinates.

Definition at line 2699 of file Rectangle.h.

References pcl::Max(), and pcl::Min().

◆ operator==() [1/3]

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

Returns true iff a rectangle r1 is equal to a scalar d2. A rectangle is equal to a scalar d if the four coordinates of r are equal to d.

Definition at line 2675 of file Rectangle.h.

◆ operator==() [2/3]

template<typename T1 , typename T2 >
bool pcl::operator== ( const GenericRectangle< T1 > &  r1,
const GenericRectangle< T2 > &  r2 
)
inlinenoexcept

Returns true iff two rectangles r1 and r2 are equal. Two rectangles are equal if their homonym coordinates are equal.

Definition at line 2664 of file Rectangle.h.

◆ operator==() [3/3]

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

Returns true iff a scalar d1 is equal to a rectangle r2. A scalar d is equal to a rectangle r if the four coordinates of r are equal to d.

Definition at line 2687 of file Rectangle.h.

◆ Rotate() [1/4]

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

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

Parameters
rReference to a rectangle 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 r.x0, r.y0, r.x1 and r.y1 are replaced by their corresponding rotated values.

Definition at line 3157 of file Rectangle.h.

◆ Rotate() [2/4]

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

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

Parameters
rReference to a rectangle 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 r.x0, r.y0, r.x1 and r.y1 are replaced by their corresponding rotated values.

Definition at line 3134 of file Rectangle.h.

◆ Rotate() [3/4]

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

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

Parameters
rReference to a rectangle 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 r.x0, r.y0, r.x1 and r.y1 are replaced by their corresponding rotated values.

Definition at line 3200 of file Rectangle.h.

References pcl::Rotate().

◆ Rotate() [4/4]

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

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

Parameters
rReference to a rectangle 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 r.x0, r.y0, r.x1 and r.y1 are replaced by their corresponding rotated values.

Definition at line 3178 of file Rectangle.h.

References pcl::Rotate().

◆ Swap()

template<typename T >
void pcl::Swap ( GenericRectangle< T > &  r1,
GenericRectangle< T > &  r2 
)
inlinenoexcept

Exchanges two rectangles r1 and r2. Calling this function is equivalent to:

pcl::Swap( r1.x0, r2.x0 ); pcl::Swap( r1.y0, r2.y0 );
pcl::Swap( r1.x1, r2.x1 ); pcl::Swap( r1.y1, r2.y1 );
void Swap(GenericPoint< T > &p1, GenericPoint< T > &p2) noexcept
Definition: Point.h:1459

Definition at line 3217 of file Rectangle.h.

References pcl::Swap().