PCL
pcl::GenericRectangle< T > Class Template Reference

A generic rectangle in the two-dimensional space. More...

#include <Rectangle.h>

Public Types

using component = T
 
using point = GenericPoint< component >
 

Public Member Functions

constexpr GenericRectangle ()
 
constexpr GenericRectangle (component d)
 
constexpr GenericRectangle (component width, component height)
 
template<typename T1 >
 GenericRectangle (const GenericRectangle< T1 > &r)
 
template<typename T1 >
 GenericRectangle (const pcl::GenericPoint< T1 > &leftTop, const pcl::GenericPoint< T1 > &rightBottom)
 
template<typename T1 >
 GenericRectangle (std::initializer_list< T1 > l)
 
template<typename T1 >
constexpr GenericRectangle (T1 left, T1 top, T1 right, T1 bottom)
 
component Area () const noexcept
 
component Bottom () const noexcept
 
point BottomLeft () const noexcept
 
point BottomRight () const noexcept
 
point Center () const noexcept
 
point CenterBottom () const noexcept
 
point CenterLeft () const noexcept
 
point CenterRight () const noexcept
 
point CenterTop () const noexcept
 
double CenterX () const noexcept
 
double CenterY () const noexcept
 
template<typename T1 >
ClipFlags ClipCode (const pcl::GenericPoint< T1 > &p) const noexcept
 
template<typename T1 >
ClipFlags ClipCode (T1 x, T1 y) const noexcept
 
template<typename T1 >
void DeflateBy (T1 d) noexcept
 
template<typename T1 >
void DeflateBy (T1 dx, T1 dy) noexcept
 
template<typename T1 >
GenericRectangle DeflatedBy (T1 d) const noexcept
 
template<typename T1 >
GenericRectangle DeflatedBy (T1 dx, T1 dy) const noexcept
 
double Diagonal () const noexcept
 
component Height () const noexcept
 
template<typename T1 >
GenericRectangle HeightSetTo (T1 h) const noexcept
 
double Hypot () const noexcept
 
template<typename T1 >
bool Includes (const GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
bool Includes (const pcl::GenericPoint< T1 > &p) const noexcept
 
template<typename T1 >
bool Includes (T1 x, T1 y) const noexcept
 
template<typename T1 >
bool IncludesFast (const pcl::GenericPoint< T1 > &p) const noexcept
 
template<typename T1 >
bool IncludesFast (T1 x, T1 y) const noexcept
 
template<typename T1 >
void InflateBy (T1 d) noexcept
 
template<typename T1 >
void InflateBy (T1 dx, T1 dy) noexcept
 
template<typename T1 >
GenericRectangle InflatedBy (T1 d) const noexcept
 
template<typename T1 >
GenericRectangle InflatedBy (T1 dx, T1 dy) const noexcept
 
template<typename T1 >
bool Intersect (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
bool Intersect (T1 left, T1 top, T1 right, T1 bottom) noexcept
 
template<typename T1 >
bool IntersectFast (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
bool IntersectFast (T1 left, T1 top, T1 right, T1 bottom) noexcept
 
template<typename T1 >
GenericRectangle Intersection (const GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
GenericRectangle IntersectionFast (const GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
bool Intersects (const pcl::GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
bool Intersects (T1 left, T1 top, T1 right, T1 bottom) const noexcept
 
template<typename T1 >
bool IntersectsFast (const pcl::GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
bool IntersectsFast (T1 left, T1 top, T1 right, T1 bottom) const noexcept
 
bool IsHorizontalLine () const noexcept
 
bool IsLine () const noexcept
 
bool IsNormal () const noexcept
 
bool IsOrdered () const noexcept
 
bool IsPoint () const noexcept
 
bool IsPointOrLine () const noexcept
 
bool IsRect () const noexcept
 
bool IsVerticalLine () const noexcept
 
component Left () const noexcept
 
point LeftBottom () const noexcept
 
point LeftTop () const noexcept
 
component ManhattanDistance () const noexcept
 
template<typename T1 >
void MoveBy (const pcl::GenericPoint< T1 > &d) noexcept
 
template<typename T1 >
void MoveBy (T1 dx, T1 dy) noexcept
 
template<typename T1 >
void MoveBy (T1 dxy) noexcept
 
template<typename T1 >
GenericRectangle MovedBy (const pcl::GenericPoint< T1 > &d) const noexcept
 
template<typename T1 >
GenericRectangle MovedBy (T1 dx, T1 dy) const noexcept
 
template<typename T1 >
GenericRectangle MovedTo (const pcl::GenericPoint< T1 > &p) const noexcept
 
template<typename T1 >
GenericRectangle MovedTo (T1 x, T1 y) const noexcept
 
template<typename T1 >
void MoveTo (const pcl::GenericPoint< T1 > &p) noexcept
 
template<typename T1 >
void MoveTo (T1 x, T1 y) noexcept
 
template<typename T1 >
GenericRectangleoperator&= (const GenericRectangle< T1 > &r) noexcept
 
GenericRectangleoperator*= (component d) noexcept
 
template<typename T1 >
GenericRectangleoperator*= (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
GenericRectangleoperator*= (const pcl::GenericPoint< T1 > &p) noexcept
 
GenericRectangle operator+ () const noexcept
 
GenericRectangleoperator+= (component d) noexcept
 
template<typename T1 >
GenericRectangleoperator+= (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
GenericRectangleoperator+= (const pcl::GenericPoint< T1 > &p) noexcept
 
GenericRectangle operator- () const noexcept
 
GenericRectangleoperator-= (component d) noexcept
 
template<typename T1 >
GenericRectangleoperator-= (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
GenericRectangleoperator-= (const pcl::GenericPoint< T1 > &p) noexcept
 
GenericRectangleoperator/= (component d) noexcept
 
template<typename T1 >
GenericRectangleoperator/= (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
GenericRectangleoperator/= (const pcl::GenericPoint< T1 > &p) noexcept
 
GenericRectangleoperator= (component d) noexcept
 
template<typename T1 >
GenericRectangleoperator= (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
GenericRectangleoperator= (const pcl::GenericPoint< T1 > &p) noexcept
 
template<typename T1 >
GenericRectangleoperator|= (const GenericRectangle< T1 > &r) noexcept
 
void Order () noexcept
 
GenericRectangle Ordered () const noexcept
 
component Perimeter () const noexcept
 
template<typename T1 >
void ResizeBy (T1 dw, T1 dh) noexcept
 
template<typename T1 >
GenericRectangle ResizedBy (T1 dw, T1 dh) const noexcept
 
template<typename T1 >
GenericRectangle ResizedTo (T1 w, T1 h) const noexcept
 
template<typename T1 >
void ResizeTo (T1 w, T1 h) noexcept
 
component Right () const noexcept
 
point RightBottom () const noexcept
 
point RightTop () const noexcept
 
template<typename T1 , typename T2 >
void Rotate (T1 angle, const GenericPoint< T2 > &center) noexcept
 
template<typename T1 , typename T2 >
void Rotate (T1 angle, T2 xc, T2 yc) noexcept
 
template<typename T1 , typename T2 >
void Rotate (T1 sa, T1 ca, const GenericPoint< T2 > &center) noexcept
 
template<typename T1 , typename T2 >
void Rotate (T1 sa, T1 ca, T2 xc, T2 yc) noexcept
 
template<typename T1 , typename T2 >
GenericRectangle Rotated (T1 angle, const GenericPoint< T2 > &center) const noexcept
 
template<typename T1 , typename T2 >
GenericRectangle Rotated (T1 angle, T2 xc, T2 yc) const noexcept
 
template<typename T1 , typename T2 >
GenericRectangle Rotated (T1 sa, T1 ca, const GenericPoint< T2 > &center) const noexcept
 
template<typename T1 , typename T2 >
GenericRectangle Rotated (T1 sa, T1 ca, T2 xc, T2 yc) const noexcept
 
void Round () noexcept
 
void Round (int n) noexcept
 
GenericRectangle Rounded () const noexcept
 
GenericRectangle Rounded (int n) const noexcept
 
GenericRectangle< int > RoundedToInt () const noexcept
 
template<typename T1 >
void Set (T1 left, T1 top, T1 right, T1 bottom) noexcept
 
template<typename T1 >
void SetHeight (T1 h) noexcept
 
template<typename T1 >
void SetWidth (T1 w) noexcept
 
component Top () const noexcept
 
point TopLeft () const noexcept
 
point TopRight () const noexcept
 
void Truncate () noexcept
 
GenericRectangle Truncated () const noexcept
 
GenericRectangle< int > TruncatedToInt () const noexcept
 
template<typename T1 >
GenericRectangle Union (const GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
GenericRectangle UnionFast (const GenericRectangle< T1 > &r) const noexcept
 
template<typename T1 >
void Unite (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
void Unite (T1 left, T1 top, T1 right, T1 bottom) noexcept
 
template<typename T1 >
void UniteFast (const GenericRectangle< T1 > &r) noexcept
 
template<typename T1 >
void UniteFast (T1 left, T1 top, T1 right, T1 bottom) noexcept
 
component Width () const noexcept
 
template<typename T1 >
GenericRectangle WidthSetTo (T1 w) const noexcept
 

Public Attributes

component x0
 Horizontal coordinate of the upper left corner.
 
component x1
 Horizontal coordinate of the lower right corner.
 
component y0
 Vertical coordinate of the upper left corner.
 
component y1
 Vertical coordinate of the lower right corner.
 

Detailed Description

template<typename T>
class pcl::GenericRectangle< T >

GenericRectangle implements a rectangle in the plane, specified by the x and y coordinates of two of its corners. The type T represents scalar rectangle coordinates and can be any real or integer numerical type.

The coordinates of GenericRectangle are directly accessed by its x0, y0, x1 and y1 data members. If the rectangle is ordered, x0 and y0 are the coordinates of its upper left corner, and x1, y1 are the coordinates of its lower right corner. Given a GenericRectangle instance r, you can use r.x0, r.y0, r.x1 and r.y1 directly to get or set coordinate values.

Important - In PCL, the right and bottom coordinates of a rectangle (that is, the values of its x1 and y1 members) are excluded from the corresponding rectangular area. The following holds for any rectangle r in PCL:

r.Width() = r.x1 - r.x0
r.Height() = r.y1 - r.y0

This is particularly relevant with template instantiations for integer types, as GenericRectangle<int>.

See also
2-D Rectangle Types, 2-D Rectangle Operators and Functions, 2-D Rectangle Classification Functions, GenericPoint

Definition at line 313 of file Rectangle.h.

Member Typedef Documentation

◆ component

template<typename T >
using pcl::GenericRectangle< T >::component = T

Represents the type of a point or rectangle component.

Definition at line 320 of file Rectangle.h.

◆ point

template<typename T >
using pcl::GenericRectangle< T >::point = GenericPoint<component>

Represents a point on the plane.

Definition at line 325 of file Rectangle.h.

Constructor & Destructor Documentation

◆ GenericRectangle() [1/7]

template<typename T >
constexpr pcl::GenericRectangle< T >::GenericRectangle ( )
inlineconstexpr

Constructs a default GenericRectangle instance. Rectangle coordinates are not initialized, so they'll have unpredictable garbage values.

Definition at line 341 of file Rectangle.h.

◆ GenericRectangle() [2/7]

template<typename T >
template<typename T1 >
constexpr pcl::GenericRectangle< T >::GenericRectangle ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlineconstexpr

Constructs a GenericRectangle instance given by its coordinates in the plane.

Parameters
left,topCoordinates of the upper left corner.
right,bottomCoordinates of the lower right corner.

The type T1 can be any suitable real or integer numerical type, or a type with numeric conversion semantics.

Definition at line 357 of file Rectangle.h.

◆ GenericRectangle() [3/7]

template<typename T >
template<typename T1 >
pcl::GenericRectangle< T >::GenericRectangle ( std::initializer_list< T1 >  l)
inline

Constructs a GenericRectangle instance from coordinates taken from the specified initializer list l.

This constructor will copy 4, 3, 2, 1 or zero rectangle coordinates, depending on the number of values in the initializer list. Coordinates that cannot be initialized from list values will be set to zero. For example, the following code:

Rect r1 = {};
Rect r2 = { 1, 2 };
Rect r3 = { 1, 2, 3 };
Rect r4 = { 1, 2, 3, 4 };
32-bit integer rectangle on the plane.

is functionally equivalent to:

Rect r1( 0, 0, 0, 0 );
Rect r2( 1, 2, 0, 0 );
Rect r3( 1, 2, 3, 0 };
Rect r4( 1, 2, 3, 4 };

Definition at line 392 of file Rectangle.h.

◆ GenericRectangle() [4/7]

template<typename T >
template<typename T1 >
pcl::GenericRectangle< T >::GenericRectangle ( const pcl::GenericPoint< T1 > &  leftTop,
const pcl::GenericPoint< T1 > &  rightBottom 
)
inline

Constructs a GenericRectangle instance given two points in the plane.

Parameters
leftTopPosition of the upper left corner.
rightBottomPosition of the lower right corner.

The type T1 can be any suitable real or integer numerical type, or a type with numeric conversion semantics.

Definition at line 425 of file Rectangle.h.

◆ GenericRectangle() [5/7]

template<typename T >
constexpr pcl::GenericRectangle< T >::GenericRectangle ( component  width,
component  height 
)
inlineconstexpr

Constructs a GenericRectangle instance given its width and height. The coordinates of the constructed rectangle will be as follows:

x0 = y0 = 0
x1 = width
y1 = height

Definition at line 440 of file Rectangle.h.

◆ GenericRectangle() [6/7]

template<typename T >
constexpr pcl::GenericRectangle< T >::GenericRectangle ( component  d)
inlineconstexpr

Constructs a GenericRectangle instance corresponding to a point located at the coordinates specified by a scalar d.

The constructed rectangle will have all of its coordinates equal to the scalar d.

Definition at line 453 of file Rectangle.h.

◆ GenericRectangle() [7/7]

template<typename T >
template<typename T1 >
pcl::GenericRectangle< T >::GenericRectangle ( const GenericRectangle< T1 > &  r)
inline

Nontrivial copy constructor. Constructs a GenericRectangle instance as a copy of the specified rectangle r.

Definition at line 464 of file Rectangle.h.

Member Function Documentation

◆ Area()

template<typename T >
component pcl::GenericRectangle< T >::Area ( ) const
inlinenoexcept

Returns the area of this rectangle. The returned value is equal to the width multiplied by the height.

Definition at line 674 of file Rectangle.h.

References pcl::Abs().

◆ Bottom()

template<typename T >
component pcl::GenericRectangle< T >::Bottom ( ) const
inlinenoexcept

Returns the bottom coordinate of this rectangle. This function returns the value of the y1 data member.

Definition at line 518 of file Rectangle.h.

◆ BottomLeft()

template<typename T >
point pcl::GenericRectangle< T >::BottomLeft ( ) const
inlinenoexcept

A synonym for LeftBottom().

Definition at line 569 of file Rectangle.h.

◆ BottomRight()

template<typename T >
point pcl::GenericRectangle< T >::BottomRight ( ) const
inlinenoexcept

A synonym for RightBottom().

Definition at line 586 of file Rectangle.h.

Referenced by pcl::QuadTree< T >::Node::SERect().

◆ Center()

template<typename T >
point pcl::GenericRectangle< T >::Center ( ) const
inlinenoexcept

Returns a point with the coordinates of the center of this rectangle.

Definition at line 594 of file Rectangle.h.

Referenced by pcl::QuadTree< T >::Node::NWRect(), and pcl::QuadTree< T >::Node::SERect().

◆ CenterBottom()

template<typename T >
point pcl::GenericRectangle< T >::CenterBottom ( ) const
inlinenoexcept

Returns the lower middle (center-bottom) point of this rectangle.

Definition at line 610 of file Rectangle.h.

References pcl::Min().

Referenced by pcl::QuadTree< T >::Node::SWRect().

◆ CenterLeft()

template<typename T >
point pcl::GenericRectangle< T >::CenterLeft ( ) const
inlinenoexcept

Returns the left middle (center-left) point of this rectangle.

Definition at line 618 of file Rectangle.h.

References pcl::Min().

Referenced by pcl::QuadTree< T >::Node::SWRect().

◆ CenterRight()

template<typename T >
point pcl::GenericRectangle< T >::CenterRight ( ) const
inlinenoexcept

Returns the right middle (center-right) point of this rectangle.

Definition at line 626 of file Rectangle.h.

References pcl::Min().

Referenced by pcl::QuadTree< T >::Node::NERect().

◆ CenterTop()

template<typename T >
point pcl::GenericRectangle< T >::CenterTop ( ) const
inlinenoexcept

Returns the upper middle (center-top) point of this rectangle.

Definition at line 602 of file Rectangle.h.

References pcl::Min().

Referenced by pcl::QuadTree< T >::Node::NERect().

◆ CenterX()

template<typename T >
double pcl::GenericRectangle< T >::CenterX ( ) const
inlinenoexcept

Returns the x coordinate of the central point of this rectangle. The returned value is a double real value equal to 0.5*(x0 + x1).

Definition at line 683 of file Rectangle.h.

◆ CenterY()

template<typename T >
double pcl::GenericRectangle< T >::CenterY ( ) const
inlinenoexcept

Returns the y coordinate of the central point of this rectangle. The returned value is a double real value equal to 0.5*(y0 + y1).

Definition at line 692 of file Rectangle.h.

◆ ClipCode() [1/2]

template<typename T >
template<typename T1 >
ClipFlags pcl::GenericRectangle< T >::ClipCode ( const pcl::GenericPoint< T1 > &  p) const
inlinenoexcept

Given a point p in the plane, this function returns a clip code for the Sutherland-Cohen line clipping algorithm.

The returned value is a combination of flags defined in the Clip namespace.

Definition at line 847 of file Rectangle.h.

◆ ClipCode() [2/2]

template<typename T >
template<typename T1 >
ClipFlags pcl::GenericRectangle< T >::ClipCode ( T1  x,
T1  y 
) const
inlinenoexcept

Given the coordinates x and y of a point in the plane, this function returns a clip code for the Sutherland-Cohen line clipping algorithm.

The returned value is a combination of flags defined in the Clip namespace.

Definition at line 810 of file Rectangle.h.

◆ DeflateBy() [1/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::DeflateBy ( T1  d)
inlinenoexcept

Shrinks this rectangle by the specified d increment on both axes. Adds d to the upper left corner, and subtracts it to the bottom right corner.

Definition at line 1661 of file Rectangle.h.

◆ DeflateBy() [2/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::DeflateBy ( T1  dx,
T1  dy 
)
inlinenoexcept

Shrinks this rectangle by the specified dx and dy increments on the X and Y axes respectively. Adds dx and dy to the upper left corner, and subtracts them to the bottom right corner.

Definition at line 1643 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::DeflatedBy().

◆ DeflatedBy() [1/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::DeflatedBy ( T1  d) const
inlinenoexcept

Returns a rectangle equivalent to this rectangle shrunk by the specified d increment on both axes.

Definition at line 1691 of file Rectangle.h.

References pcl::GenericRectangle< T >::DeflateBy().

◆ DeflatedBy() [2/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::DeflatedBy ( T1  dx,
T1  dy 
) const
inlinenoexcept

Returns a rectangle equivalent to this rectangle shrunk by the specified dx and dy increments.

Definition at line 1679 of file Rectangle.h.

References pcl::GenericRectangle< T >::DeflateBy().

◆ Diagonal()

template<typename T >
double pcl::GenericRectangle< T >::Diagonal ( ) const
inlinenoexcept

Returns the length of the diagonal of this rectangle, equal to the square root of the Hypot() function.

Definition at line 713 of file Rectangle.h.

References pcl::Sqrt().

◆ Height()

template<typename T >
component pcl::GenericRectangle< T >::Height ( ) const
inlinenoexcept

Returns the height of this rectangle. The returned value is the absolute difference between the y1 and y0 data members.

Definition at line 644 of file Rectangle.h.

References pcl::Abs().

Referenced by pcl::ImageInfo::ImageInfo(), pcl::Control::BoundsRect(), and pcl::SplineWorldTransformation::InitializeGridInterpolations().

◆ HeightSetTo()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::HeightSetTo ( T1  h) const
inlinenoexcept

Returns a rectangle r equal to this rectangle resized vertically to the specified height h:

GenericRectangle<T> r( *this ); r.SetHeight( h );

Definition at line 1719 of file Rectangle.h.

References pcl::GenericRectangle< T >::SetHeight().

◆ Hypot()

template<typename T >
double pcl::GenericRectangle< T >::Hypot ( ) const
inlinenoexcept

Returns the square of the diagonal of this rectangle. This is also the square of the hypotenuse of the half-triangle defined by this rectangle. The returned value is equal to the square of the width multiplied by the square of the height.

Definition at line 703 of file Rectangle.h.

◆ Includes() [1/3]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Includes ( const GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns true iff this rectangle completely includes a rectangle r.

Definition at line 876 of file Rectangle.h.

◆ Includes() [2/3]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Includes ( const pcl::GenericPoint< T1 > &  p) const
inlinenoexcept

Returns true iff this rectangle includes a point p.

Definition at line 867 of file Rectangle.h.

◆ Includes() [3/3]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Includes ( T1  x,
T1  y 
) const
inlinenoexcept

Returns true iff this rectangle includes a point specified by its separate x and y coordinates.

Definition at line 857 of file Rectangle.h.

◆ IncludesFast() [1/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IncludesFast ( const pcl::GenericPoint< T1 > &  p) const
inlinenoexcept

Returns true iff this rectangle includes a point p.

This function assumes an ordered rectangle, that is, it requires that the conditions x0 ≤ x1 and y0 ≤ y1 hold. Otherwise this function will return a wrong result.

Definition at line 915 of file Rectangle.h.

◆ IncludesFast() [2/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IncludesFast ( T1  x,
T1  y 
) const
inlinenoexcept

Returns true iff this rectangle includes a point specified by its separate x and y coordinates.

This function assumes an ordered rectangle, that is, it requires that the conditions x0 ≤ x1 and y0 ≤ y1 hold. Otherwise this function will return a wrong result.

Definition at line 902 of file Rectangle.h.

◆ InflateBy() [1/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::InflateBy ( T1  d)
inlinenoexcept

Inflates this rectangle by the specified d increment on both axes. Subtracts d to the upper left corner, and adds it to the bottom right corner.

Definition at line 1600 of file Rectangle.h.

◆ InflateBy() [2/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::InflateBy ( T1  dx,
T1  dy 
)
inlinenoexcept

Inflates this rectangle by the specified dx and dy increments on the X and Y axes respectively. Subtracts dx and dy to the upper left corner, and adds them to the bottom right corner.

Definition at line 1582 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::InflatedBy().

◆ InflatedBy() [1/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::InflatedBy ( T1  d) const
inlinenoexcept

Returns a rectangle equivalent to this rectangle inflated by the specified d increments on both axes.

Definition at line 1630 of file Rectangle.h.

References pcl::GenericRectangle< T >::InflateBy().

◆ InflatedBy() [2/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::InflatedBy ( T1  dx,
T1  dy 
) const
inlinenoexcept

Returns a rectangle equivalent to this rectangle inflated by the specified dx and dy increments.

Definition at line 1618 of file Rectangle.h.

References pcl::GenericRectangle< T >::InflateBy().

◆ Intersect() [1/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Intersect ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to be equal to its intersection with a given rectangle r.

Returns true iff the resulting intersection is a nonempty rectangle, i.e. iff this->x0 != this->x1 and this->y0 != this->y1 after calling this function.

Definition at line 1148 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::Intersection().

◆ Intersect() [2/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Intersect ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlinenoexcept

Causes this rectangle to be equal to its intersection with a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle that will intersect this rectangle.
right,bottomLower right corner coordinates of a rectangle that will intersect this rectangle.

Returns true iff the resulting intersection is a nonempty rectangle, i.e. iff this->x0 != this->x1 and this->y0 != this->y1 after calling this function.

Definition at line 1168 of file Rectangle.h.

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

◆ IntersectFast() [1/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IntersectFast ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to be equal to its intersection with a given rectangle r.

Returns true iff the resulting intersection is a nonempty rectangle, i.e. iff this->x0 != this->x1 and this->y0 != this->y1 after calling this function.

To produce a valid result, this function assumes that both this and the specified object r are ordered rectangles.

Definition at line 1212 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::IntersectionFast().

◆ IntersectFast() [2/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IntersectFast ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlinenoexcept

Causes this rectangle to be equal to its intersection with a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle that will intersect this rectangle.
right,bottomLower right corner coordinates of a rectangle that will intersect this rectangle.

Returns true iff the resulting intersection is a nonempty rectangle, i.e. iff this->x0 != this->x1 and this->y0 != this->y1 after calling this function.

For a valid result, this function assumes the following conditions:

  • The specified set left, top, right and bottom must define an ordered rectangle, that is, the conditions leftright and topbottom must hold.
  • This rectangle must be ordered, that is, the conditions x0 ≤ x1 and y0 ≤ y1 must hold.

Definition at line 1241 of file Rectangle.h.

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

◆ Intersection()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::Intersection ( const GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns a rectangle equal to the intersection of this rectangle and another rectangle r.

Definition at line 1255 of file Rectangle.h.

References pcl::GenericRectangle< T >::Intersect().

◆ IntersectionFast()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::IntersectionFast ( const GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns a rectangle equal to the intersection of this rectangle and another rectangle r.

To give a valid result, this function assumes that both this and the specified object r are ordered rectangles.

Definition at line 1270 of file Rectangle.h.

References pcl::GenericRectangle< T >::IntersectFast().

◆ Intersects() [1/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Intersects ( const pcl::GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns true iff this rectangle intersects a rectangle r.

Definition at line 942 of file Rectangle.h.

◆ Intersects() [2/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::Intersects ( T1  left,
T1  top,
T1  right,
T1  bottom 
) const
inlinenoexcept

Returns true iff this rectangle intersects a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle to test for intersection.
right,bottomLower right corner coordinates of a rectangle to test for intersection.

Definition at line 931 of file Rectangle.h.

References pcl::OrderRect().

◆ IntersectsFast() [1/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IntersectsFast ( const pcl::GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns true iff this rectangle intersects a rectangle r.

To give a valid result, this function assumes that both this and the specified object r are ordered rectangles.

Definition at line 986 of file Rectangle.h.

◆ IntersectsFast() [2/2]

template<typename T >
template<typename T1 >
bool pcl::GenericRectangle< T >::IntersectsFast ( T1  left,
T1  top,
T1  right,
T1  bottom 
) const
inlinenoexcept

Returns true iff this rectangle intersects a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle to test for intersection.
right,bottomLower right corner coordinates of a rectangle to test for intersection.

For a valid result, this function assumes the following conditions:

  • The specified set left, top, right and bottom must define an ordered rectangle, that is, the conditions leftright and topbottom must hold.
  • This rectangle must be ordered, that is, the conditions x0 ≤ x1 and y0 ≤ y1 must hold.

Definition at line 974 of file Rectangle.h.

◆ IsHorizontalLine()

template<typename T >
bool pcl::GenericRectangle< T >::IsHorizontalLine ( ) const
inlinenoexcept

Returns true iff this rectangle defines a horizontal line.

Definition at line 737 of file Rectangle.h.

References pcl::IsHorizontalLine().

◆ IsLine()

template<typename T >
bool pcl::GenericRectangle< T >::IsLine ( ) const
inlinenoexcept

Returns true iff this rectangle defines a line.

Definition at line 729 of file Rectangle.h.

References pcl::IsLine().

◆ IsNormal()

template<typename T >
bool pcl::GenericRectangle< T >::IsNormal ( ) const
inlinenoexcept

Returns true iff this is a normal rectangle.

Definition at line 770 of file Rectangle.h.

References pcl::IsNormalRect().

◆ IsOrdered()

template<typename T >
bool pcl::GenericRectangle< T >::IsOrdered ( ) const
inlinenoexcept

Returns true iff this is an ordered rectangle.

Definition at line 778 of file Rectangle.h.

References pcl::IsOrderedRect().

◆ IsPoint()

template<typename T >
bool pcl::GenericRectangle< T >::IsPoint ( ) const
inlinenoexcept

Returns true iff this rectangle defines a point in the plane.

Definition at line 721 of file Rectangle.h.

References pcl::IsPoint().

◆ IsPointOrLine()

template<typename T >
bool pcl::GenericRectangle< T >::IsPointOrLine ( ) const
inlinenoexcept

Returns true iff this rectangle defines a point or a line.

Definition at line 753 of file Rectangle.h.

References pcl::IsPointOrLine().

◆ IsRect()

template<typename T >
bool pcl::GenericRectangle< T >::IsRect ( ) const
inlinenoexcept

Returns true iff the coordinates of this object define a rectangle, instead of a point or a line.

Definition at line 762 of file Rectangle.h.

References pcl::IsRect().

◆ IsVerticalLine()

template<typename T >
bool pcl::GenericRectangle< T >::IsVerticalLine ( ) const
inlinenoexcept

Returns true iff this rectangle defines a vertical line.

Definition at line 745 of file Rectangle.h.

References pcl::IsVerticalLine().

◆ Left()

template<typename T >
component pcl::GenericRectangle< T >::Left ( ) const
inlinenoexcept

Returns the left coordinate of this rectangle. This function returns the value of the x0 data member.

Definition at line 491 of file Rectangle.h.

◆ LeftBottom()

template<typename T >
point pcl::GenericRectangle< T >::LeftBottom ( ) const
inlinenoexcept

Returns a point with the coordinates of the lower left (left-bottom) corner of this rectangle.

Definition at line 561 of file Rectangle.h.

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

◆ LeftTop()

template<typename T >
point pcl::GenericRectangle< T >::LeftTop ( ) const
inlinenoexcept

Returns a point with the coordinates of the upper left (left-top) corner of this rectangle.

Definition at line 527 of file Rectangle.h.

References pcl::Min().

◆ ManhattanDistance()

template<typename T >
component pcl::GenericRectangle< T >::ManhattanDistance ( ) const
inlinenoexcept

Returns the Manhattan distance between two opposite corners of this rectangle.

The returned value is equal to the width plus the height.

Definition at line 665 of file Rectangle.h.

◆ MoveBy() [1/3]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::MoveBy ( const pcl::GenericPoint< T1 > &  d)
inlinenoexcept

Moves this rectangle relative to its current position, by applying the coordinates of a point d as increments in the X and Y directions.

Definition at line 1393 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::MovedBy().

◆ MoveBy() [2/3]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::MoveBy ( T1  dx,
T1  dy 
)
inlinenoexcept

Moves this rectangle relative to its current position, by applying the specified dx and dy increments to its coordinates in the X and Y directions, respectively.

Definition at line 1404 of file Rectangle.h.

◆ MoveBy() [3/3]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::MoveBy ( T1  dxy)
inlinenoexcept

Moves this rectangle relative to its current position, by applying the specified dxy increment to its four coordinates in the X and Y directions.

This function is functionally equivalent to:

MoveBy( dxy, dxy );
void MoveBy(const pcl::GenericPoint< T1 > &d) noexcept
Definition: Rectangle.h:1393

Definition at line 1422 of file Rectangle.h.

◆ MovedBy() [1/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::MovedBy ( const pcl::GenericPoint< T1 > &  d) const
inlinenoexcept

Returns a rectangle r equal to this rectangle moved relative to its current position:

GenericRectangle<T> r( *this ); r.MoveBy( d );

Definition at line 1444 of file Rectangle.h.

References pcl::GenericRectangle< T >::MoveBy().

◆ MovedBy() [2/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::MovedBy ( T1  dx,
T1  dy 
) const
inlinenoexcept

Returns a rectangle r equal to this rectangle moved relative to its current position:

GenericRectangle<T> r( *this ); r.MoveBy( dx, dy );

Definition at line 1458 of file Rectangle.h.

References pcl::GenericRectangle< T >::MoveBy().

◆ MovedTo() [1/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::MovedTo ( const pcl::GenericPoint< T1 > &  p) const
inlinenoexcept

Returns a rectangle r equal to this rectangle moved to the specified location:

GenericRectangle r( *this ); r.MoveTo( p );
constexpr GenericRectangle()
Definition: Rectangle.h:341

Definition at line 1367 of file Rectangle.h.

References pcl::GenericRectangle< T >::MoveTo().

◆ MovedTo() [2/2]

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::MovedTo ( T1  x,
T1  y 
) const
inlinenoexcept

Returns a rectangle r equal to this rectangle moved to the specified location:

GenericRectangle<T> r( *this ); r.MoveTo( x, y );

Definition at line 1381 of file Rectangle.h.

References pcl::GenericRectangle< T >::MoveTo().

◆ MoveTo() [1/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::MoveTo ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Moves this rectangle to the specified location, by setting its upper left corner coordinates to those of a given point p.

The coordinates of the lower right corner of this rectangle are readjusted to keep its width and height unmodified.

Definition at line 1331 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::MovedTo().

◆ MoveTo() [2/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::MoveTo ( T1  x,
T1  y 
)
inlinenoexcept

Moves this rectangle to the specified location, by setting its upper left corner coordinates equal to the given x and y coordinates.

The coordinates of the lower right corner of this rectangle are readjusted to keep its width and height unmodified.

Definition at line 1344 of file Rectangle.h.

◆ operator&=()

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator&= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to be equal to its intersection with another rectangle r. Returns a reference to this rectangle.

Definition at line 1282 of file Rectangle.h.

◆ operator*=() [1/3]

template<typename T >
GenericRectangle& pcl::GenericRectangle< T >::operator*= ( component  d)
inlinenoexcept

Multiplies this rectangle by a scalar d. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position, plus a scaling factor applied to both sides of the rectangle. Given a rectangle r and a scalar d, the product rectangle P = r * d is given by:

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

Definition at line 2193 of file Rectangle.h.

◆ operator*=() [2/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator*= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Multiplies this rectangle by a rectangle r. Returns a reference to this rectangle.

This function multiplies 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 2146 of file Rectangle.h.

◆ operator*=() [3/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator*= ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Multiplies this rectangle by a point p. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position, plus a scaling factor applied to both sides of the rectangle. Given a rectangle r and a point p, the product rectangle P = r * p is given by:

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

Definition at line 2170 of file Rectangle.h.

◆ operator+()

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::operator+ ( ) const
inlinenoexcept

Returns a copy of this rectangle.

Definition at line 2297 of file Rectangle.h.

◆ operator+=() [1/3]

template<typename T >
GenericRectangle& pcl::GenericRectangle< T >::operator+= ( component  d)
inlinenoexcept

Adds a scalar d to this rectangle. Returns a reference to this rectangle.

This function adds the specified scalar to the four rectangle coordinates. This is equivalent to a translation relative to the current position. 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 2032 of file Rectangle.h.

◆ operator+=() [2/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator+= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Adds a rectangle r to this rectangle. Returns a reference to this rectangle.

This function adds 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 1986 of file Rectangle.h.

◆ operator+=() [3/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator+= ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Adds a point p to this rectangle. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position. 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 2009 of file Rectangle.h.

◆ operator-()

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::operator- ( ) const
inlinenoexcept

Returns a rectangle whose coordinates have the same magnitudes as the coordinates of this rectangle, but opposite signs. The returned rectangle so defined is symmetric to this rectangle with respect to the origin of coordinates.

Definition at line 2308 of file Rectangle.h.

◆ operator-=() [1/3]

template<typename T >
GenericRectangle& pcl::GenericRectangle< T >::operator-= ( component  d)
inlinenoexcept

Subtracts a scalar d from this rectangle. Returns a reference to this rectangle.

This function subtracts the specified scalar from the four rectangle coordinates. This is equivalent to a translation relative to the current position. 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 2112 of file Rectangle.h.

◆ operator-=() [2/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator-= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Subtracts a rectangle r from this rectangle. Returns a reference to this rectangle.

This function subtracts 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 2066 of file Rectangle.h.

◆ operator-=() [3/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator-= ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Subtracts a point p from this rectangle. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position. 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 2089 of file Rectangle.h.

◆ operator/=() [1/3]

template<typename T >
GenericRectangle& pcl::GenericRectangle< T >::operator/= ( component  d)
inlinenoexcept

Divides this rectangle by a scalar d. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position, plus a scaling factor applied to both sides of the 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 2274 of file Rectangle.h.

◆ operator/=() [2/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator/= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Divides this rectangle by a rectangle r. Returns a reference to this rectangle.

This function divides 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 2224 of file Rectangle.h.

◆ operator/=() [3/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator/= ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Divides this rectangle by a point p. Returns a reference to this rectangle.

This function is equivalent to a translation relative to the current position, plus a scaling factor applied to both sides of the 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 2250 of file Rectangle.h.

◆ operator=() [1/3]

template<typename T >
GenericRectangle& pcl::GenericRectangle< T >::operator= ( component  d)
inlinenoexcept

Assigns a scalar d to this rectangle. Returns a reference to this rectangle.

The scalar d is assigned to the four coordinates of this rectangle.

Definition at line 1956 of file Rectangle.h.

◆ operator=() [2/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Assigns a rectangle r to this rectangle. Returns a reference to this rectangle.

Definition at line 1926 of file Rectangle.h.

◆ operator=() [3/3]

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator= ( const pcl::GenericPoint< T1 > &  p)
inlinenoexcept

Assigns a point p to this rectangle. Returns a reference to this rectangle.

The p.x and p.y coordinates are assigned, respectively, to the horizontal and vertical coordinates of this rectangle.

Definition at line 1943 of file Rectangle.h.

◆ operator|=()

template<typename T >
template<typename T1 >
GenericRectangle& pcl::GenericRectangle< T >::operator|= ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to include a given rectangle r, by adjusting coordinates as necessary. Returns a reference to this rectangle.

Definition at line 1113 of file Rectangle.h.

◆ Order()

template<typename T >
void pcl::GenericRectangle< T >::Order ( )
inlinenoexcept

Orders the coordinates of this rectangle.

Definition at line 786 of file Rectangle.h.

References pcl::OrderRect().

Referenced by pcl::GenericRectangle< T >::Ordered().

◆ Ordered()

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::Ordered ( ) const
inlinenoexcept

Returns an ordered rectangle equivalent to this.

Definition at line 794 of file Rectangle.h.

References pcl::GenericRectangle< T >::Order().

Referenced by pcl::GenericImage< P >::CropTo(), pcl::QuadTree< T >::Delete(), and pcl::QuadTree< T >::Search().

◆ Perimeter()

template<typename T >
component pcl::GenericRectangle< T >::Perimeter ( ) const
inlinenoexcept

Returns the perimeter of this rectangle. The returned value is equal to twice the width plus twice the height.

Definition at line 653 of file Rectangle.h.

◆ ResizeBy()

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::ResizeBy ( T1  dw,
T1  dh 
)
inlinenoexcept

Changes the size of this rectangle relative to its current dimensions, by applying the specified dw and dh increments to its width and height, respectively.

This function does not vary the current order of rectangle coordinates. If a coordinate of the upper left corner is less than or equal to its bottom right counterpart, the bottom right coordinate is modified. Inversely, if the bottom right coordinate is less than the upper left one, the upper left coordinate is modified.

Definition at line 1515 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::ResizedBy().

◆ ResizedBy()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::ResizedBy ( T1  dw,
T1  dh 
) const
inlinenoexcept

Returns a rectangle r equal to this rectangle resized relative to its current dimensions:

GenericRectangle<T> r( *this ); r.ResizeBy( dw, dh );

Definition at line 1535 of file Rectangle.h.

References pcl::GenericRectangle< T >::ResizeBy().

◆ ResizedTo()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::ResizedTo ( T1  w,
T1  h 
) const
inlinenoexcept

Returns a rectangle r equal to this rectangle resized to the specified dimensions:

GenericRectangle<T> r( *this ); r.ResizeTo( w, h );

Definition at line 1496 of file Rectangle.h.

References pcl::GenericRectangle< T >::ResizeTo().

◆ ResizeTo()

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::ResizeTo ( T1  w,
T1  h 
)
inlinenoexcept

Changes the size of this rectangle to the specified width w and height h, respectively.

This function does not vary the current order of rectangle coordinates. If a coordinate of the upper left corner is less than or equal to its bottom right counterpart, the bottom right coordinate is modified. Inversely, if the bottom right coordinate is less than the upper left one, the upper left coordinate is modified.

Definition at line 1476 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::ResizedTo().

◆ Right()

template<typename T >
component pcl::GenericRectangle< T >::Right ( ) const
inlinenoexcept

Returns the right coordinate of this rectangle. This function returns the value of the x1 data member.

Definition at line 509 of file Rectangle.h.

◆ RightBottom()

template<typename T >
point pcl::GenericRectangle< T >::RightBottom ( ) const
inlinenoexcept

Returns a point with the coordinates of the lower right (right-bottom) corner of this rectangle.

Definition at line 578 of file Rectangle.h.

References pcl::Max().

◆ RightTop()

template<typename T >
point pcl::GenericRectangle< T >::RightTop ( ) const
inlinenoexcept

Returns a point with the coordinates of the upper right (right-top) corner of this rectangle.

Definition at line 544 of file Rectangle.h.

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

◆ Rotate() [1/4]

template<typename T >
template<typename T1 , typename T2 >
void pcl::GenericRectangle< T >::Rotate ( T1  angle,
const GenericPoint< T2 > &  center 
)
inlinenoexcept

Rotates this rectangle in the plane by the specified angle in radians, with respect to the specified center of rotation.

Definition at line 1744 of file Rectangle.h.

References pcl::Rotate().

◆ Rotate() [2/4]

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

Rotates this rectangle in the plane by the specified angle in radians, with respect to a center of rotation given by its coordinates xc and yc.

Definition at line 1732 of file Rectangle.h.

References pcl::Rotate(), and pcl::SinCos().

Referenced by pcl::GenericRectangle< T >::Rotated().

◆ Rotate() [3/4]

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

Rotates this rectangle in the plane by the specified angle, given by its sine and cosine, sa and ca respectively, with respect to the specified center of rotation.

Definition at line 1767 of file Rectangle.h.

References pcl::Rotate().

◆ Rotate() [4/4]

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

Rotates this rectangle in the plane by the specified angle, given by its sine and cosine, sa and ca respectively, with respect to a center of rotation given by its coordinates xc and yc.

Definition at line 1755 of file Rectangle.h.

References pcl::Rotate().

◆ Rotated() [1/4]

template<typename T >
template<typename T1 , typename T2 >
GenericRectangle pcl::GenericRectangle< T >::Rotated ( T1  angle,
const GenericPoint< T2 > &  center 
) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rotated in the plane by the specified angle in radians, with respect to the specified center of rotation.

Definition at line 1791 of file Rectangle.h.

References pcl::GenericRectangle< T >::Rotate().

◆ Rotated() [2/4]

template<typename T >
template<typename T1 , typename T2 >
GenericRectangle pcl::GenericRectangle< T >::Rotated ( T1  angle,
T2  xc,
T2  yc 
) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rotated in the plane by the specified angle in radians, with respect to a center of rotation given by its coordinates xc and yc.

Definition at line 1778 of file Rectangle.h.

References pcl::GenericRectangle< T >::Rotate().

◆ Rotated() [3/4]

template<typename T >
template<typename T1 , typename T2 >
GenericRectangle pcl::GenericRectangle< T >::Rotated ( T1  sa,
T1  ca,
const GenericPoint< T2 > &  center 
) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rotated in the plane by the specified angle given by its sine and cosine, sa and ca respectively, with respect to the specified center of rotation.

Definition at line 1819 of file Rectangle.h.

References pcl::GenericRectangle< T >::Rotate().

◆ Rotated() [4/4]

template<typename T >
template<typename T1 , typename T2 >
GenericRectangle pcl::GenericRectangle< T >::Rotated ( T1  sa,
T1  ca,
T2  xc,
T2  yc 
) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rotated in the plane by the specified angle given by its sine and cosine, sa and ca respectively, with respect to a center of rotation given by its coordinates xc and yc.

Definition at line 1805 of file Rectangle.h.

References pcl::GenericRectangle< T >::Rotate().

◆ Round() [1/2]

template<typename T >
void pcl::GenericRectangle< T >::Round ( )
inlinenoexcept

Rounds the coordinates of this rectangle to their corresponding nearest integer coordinates.

Definition at line 1830 of file Rectangle.h.

References pcl::Round().

◆ Round() [2/2]

template<typename T >
void pcl::GenericRectangle< T >::Round ( int  n)
inlinenoexcept

Rounds the coordinates of this rectangle to n fractional digits (n >= 0).

Definition at line 1842 of file Rectangle.h.

References pcl::Round().

◆ Rounded() [1/2]

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::Rounded ( ) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rounded to their nearest integers.

Definition at line 1857 of file Rectangle.h.

References pcl::Round().

◆ Rounded() [2/2]

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::Rounded ( int  n) const
inlinenoexcept

Returns a rectangle whose coordinates are the coordinates of this object rounded to n fractional digits (n >= 0).

Definition at line 1867 of file Rectangle.h.

References pcl::Round().

◆ RoundedToInt()

template<typename T >
GenericRectangle<int> pcl::GenericRectangle< T >::RoundedToInt ( ) const
inlinenoexcept

Returns a rectangle of integer template type whose coordinates are the coordinates of this object rounded to their nearest integers.

Definition at line 1878 of file Rectangle.h.

References pcl::RoundInt().

◆ Set()

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::Set ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlinenoexcept

Sets the four coordinates of this rectangle to the specified values.

Parameters
left,topNew upper left corner coordinates.
right,bottomNew lower right corner coordinates.

Definition at line 1315 of file Rectangle.h.

◆ SetHeight()

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::SetHeight ( T1  h)
inlinenoexcept

Sets the height of this rectangle to the specified value h.

This function does not vary the current order of vertical rectangle coordinates. If the y0 rectangle coordinate is less than or equal to y1, the y1 coordinate is modified. Inversely, if the y1 coordinate is less than y0, then y0 is modified.

Definition at line 1568 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::HeightSetTo().

◆ SetWidth()

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::SetWidth ( T1  w)
inlinenoexcept

Sets the width of this rectangle to the specified value w.

This function does not vary the current order of horizontal rectangle coordinates. If the x0 rectangle coordinate is less than or equal to x1, the x1 coordinate is modified. Inversely, if the x1 coordinate is less than x0, then x0 is modified.

Definition at line 1551 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::WidthSetTo().

◆ Top()

template<typename T >
component pcl::GenericRectangle< T >::Top ( ) const
inlinenoexcept

Returns the top coordinate of this rectangle. This function returns the value of the y0 data member.

Definition at line 500 of file Rectangle.h.

◆ TopLeft()

template<typename T >
point pcl::GenericRectangle< T >::TopLeft ( ) const
inlinenoexcept

A synonym for LeftTop().

Definition at line 535 of file Rectangle.h.

Referenced by pcl::QuadTree< T >::Node::NWRect().

◆ TopRight()

template<typename T >
point pcl::GenericRectangle< T >::TopRight ( ) const
inlinenoexcept

A synonym for RightTop().

Definition at line 552 of file Rectangle.h.

◆ Truncate()

template<typename T >
void pcl::GenericRectangle< T >::Truncate ( )
inlinenoexcept

Integer truncation of coordinates. Sets the coordinates x0, y0, x1, y1 of this rectangle to the nearest integer coordinates a, b, c, d such that a <= x0, b <= y0, c <= x1, d <= y1.

Definition at line 1889 of file Rectangle.h.

References pcl::Trunc().

◆ Truncated()

template<typename T >
GenericRectangle pcl::GenericRectangle< T >::Truncated ( ) const
inlinenoexcept

Integer truncation of coordinates. Returns a rectangle whose coordinates are the coordinates x0, y0, x1, y1 of this rectangle, truncated to their nearest integer coordinates a, b, c, d such that a <= x0, b <= y0, c <= x1, d <= y1.

Definition at line 1903 of file Rectangle.h.

References pcl::Trunc().

◆ TruncatedToInt()

template<typename T >
GenericRectangle<int> pcl::GenericRectangle< T >::TruncatedToInt ( ) const
inlinenoexcept

Integer truncation of coordinates. Returns a rectangle of integer template type whose coordinates are the coordinates x0, y0, x1, y1 of this rectangle truncated to the nearest integer coordinates a, b, c, d such that a <= x0, b <= y0, c <= x1, d <= y1.

Definition at line 1915 of file Rectangle.h.

References pcl::TruncInt().

◆ Union()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::Union ( const GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns a rectangle that includes this one and another rectangle r.

Definition at line 1087 of file Rectangle.h.

References pcl::GenericRectangle< T >::Unite().

◆ UnionFast()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::UnionFast ( const GenericRectangle< T1 > &  r) const
inlinenoexcept

Returns a rectangle that includes this one and another rectangle r.

To give a valid result, this function assumes that both this and the specified object r are ordered rectangles.

Definition at line 1101 of file Rectangle.h.

References pcl::GenericRectangle< T >::UniteFast().

◆ Unite() [1/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::Unite ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to include a given rectangle r, by adjusting its coordinates as necessary.

Definition at line 996 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::Union().

◆ Unite() [2/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::Unite ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlinenoexcept

Causes this rectangle to include a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle that will be included by this rectangle.
right,bottomLower right corner coordinates of a rectangle that will be included by this rectangle.

Definition at line 1012 of file Rectangle.h.

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

◆ UniteFast() [1/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::UniteFast ( const GenericRectangle< T1 > &  r)
inlinenoexcept

Causes this rectangle to include a given rectangle r, by adjusting its coordinates as necessary.

To produce a valid result, this function assumes that both this and the specified object r are ordered rectangles.

Definition at line 1050 of file Rectangle.h.

Referenced by pcl::GenericRectangle< T >::UnionFast().

◆ UniteFast() [2/2]

template<typename T >
template<typename T1 >
void pcl::GenericRectangle< T >::UniteFast ( T1  left,
T1  top,
T1  right,
T1  bottom 
)
inlinenoexcept

Causes this rectangle to include a rectangle specified by its individual coordinates.

Parameters
left,topUpper left corner coordinates of a rectangle that will be included by this rectangle.
right,bottomLower right corner coordinates of a rectangle that will be included by this rectangle.

For a valid result, this function assumes the following conditions:

  • The specified set left, top, right and bottom must define an ordered rectangle, that is, the conditions leftright and topbottom must hold.
  • This rectangle must be ordered, that is, the conditions x0 ≤ x1 and y0 ≤ y1 must hold.

Definition at line 1075 of file Rectangle.h.

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

◆ Width()

template<typename T >
component pcl::GenericRectangle< T >::Width ( ) const
inlinenoexcept

Returns the width of this rectangle. The returned value is the absolute difference between the x1 and x0 data members.

Definition at line 635 of file Rectangle.h.

References pcl::Abs().

Referenced by pcl::ImageInfo::ImageInfo(), pcl::Control::BoundsRect(), and pcl::SplineWorldTransformation::InitializeGridInterpolations().

◆ WidthSetTo()

template<typename T >
template<typename T1 >
GenericRectangle pcl::GenericRectangle< T >::WidthSetTo ( T1  w) const
inlinenoexcept

Returns a rectangle r equal to this rectangle resized horizontally to the specified width w:

GenericRectangle<T> r( *this ); r.SetWidth( w );

Definition at line 1705 of file Rectangle.h.

References pcl::GenericRectangle< T >::SetWidth().


The documentation for this class was generated from the following file: