PCL
pcl::GenericRectangle< T > Class Template Reference

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

#include <Rectangle.h>

Public Types

typedef T component
 
typedef GenericPoint< componentpoint
 

Public Member Functions

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

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>
typedef T pcl::GenericRectangle< T >::component

Represents the type of a point or rectangle component.

Definition at line 320 of file Rectangle.h.

◆ point

template<typename T>
typedef GenericPoint<component> pcl::GenericRectangle< T >::point

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 ( )
inline

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 
)
inline

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 };

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 390 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 423 of file Rectangle.h.

◆ GenericRectangle() [5/7]

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

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 438 of file Rectangle.h.

◆ GenericRectangle() [6/7]

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

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 451 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 462 of file Rectangle.h.

Member Function Documentation

◆ Area()

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

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

Definition at line 672 of file Rectangle.h.

References pcl::Abs().

◆ Bottom()

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

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

Definition at line 516 of file Rectangle.h.

◆ BottomLeft()

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

A synonym for LeftBottom().

Definition at line 567 of file Rectangle.h.

◆ BottomRight()

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

A synonym for RightBottom().

Definition at line 584 of file Rectangle.h.

◆ Center()

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

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

Definition at line 592 of file Rectangle.h.

◆ CenterBottom()

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

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

Definition at line 608 of file Rectangle.h.

References pcl::Min().

◆ CenterLeft()

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

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

Definition at line 616 of file Rectangle.h.

References pcl::Min().

◆ CenterRight()

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

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

Definition at line 624 of file Rectangle.h.

References pcl::Min().

◆ CenterTop()

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

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

Definition at line 600 of file Rectangle.h.

References pcl::Min().

◆ CenterX()

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

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 681 of file Rectangle.h.

◆ CenterY()

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

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 690 of file Rectangle.h.

◆ ClipCode() [1/2]

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

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 808 of file Rectangle.h.

◆ ClipCode() [2/2]

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

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 845 of file Rectangle.h.

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

◆ DeflateBy() [1/2]

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

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 1468 of file Rectangle.h.

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

◆ DeflateBy() [2/2]

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

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 1486 of file Rectangle.h.

◆ DeflatedBy() [1/2]

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

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

Definition at line 1504 of file Rectangle.h.

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

◆ DeflatedBy() [2/2]

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

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

Definition at line 1516 of file Rectangle.h.

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

◆ Diagonal()

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

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

Definition at line 711 of file Rectangle.h.

References pcl::Sqrt().

◆ Height()

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

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

Definition at line 642 of file Rectangle.h.

References pcl::Abs().

◆ HeightSetTo()

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

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 1544 of file Rectangle.h.

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

◆ Hypot()

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

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 701 of file Rectangle.h.

◆ Includes() [1/3]

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

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

Definition at line 855 of file Rectangle.h.

◆ Includes() [2/3]

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

Returns true iff this rectangle includes a point p.

Definition at line 865 of file Rectangle.h.

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

◆ Includes() [3/3]

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

Returns true iff this rectangle completely includes a rectangle r.

Definition at line 874 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ IncludesFast() [1/2]

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

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 900 of file Rectangle.h.

◆ IncludesFast() [2/2]

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

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 913 of file Rectangle.h.

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

◆ InflateBy() [1/2]

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

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 1407 of file Rectangle.h.

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

◆ InflateBy() [2/2]

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

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 1425 of file Rectangle.h.

◆ InflatedBy() [1/2]

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

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

Definition at line 1443 of file Rectangle.h.

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

◆ InflatedBy() [2/2]

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

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

Definition at line 1455 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)
inline

Causes this rectangle to be equal to its intersection with a given rectangle r, by adjusting coordinates as necessary.

Definition at line 1065 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

Referenced by pcl::GenericRectangle< T >::Intersection(), and pcl::GenericRectangle< T >::operator&=().

◆ Intersect() [2/2]

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

Causes this rectangle to be equal to its intersection with a rectangle pecified 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.

Definition at line 1081 of file Rectangle.h.

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

◆ Intersection()

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

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

Definition at line 1095 of file Rectangle.h.

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

◆ Intersects() [1/2]

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

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 929 of file Rectangle.h.

References pcl::OrderRect().

◆ Intersects() [2/2]

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

Returns true iff this rectangle intersects a rectangle r.

Definition at line 940 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ IntersectsFast() [1/2]

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

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 972 of file Rectangle.h.

◆ IntersectsFast() [2/2]

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

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 984 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ IsHorizontalLine()

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

Returns true iff this rectangle defines a horizontal line.

Definition at line 735 of file Rectangle.h.

References pcl::IsHorizontalLine().

◆ IsLine()

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

Returns true iff this rectangle defines a line.

Definition at line 727 of file Rectangle.h.

References pcl::IsLine().

◆ IsNormal()

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

Returns true iff this is a normal rectangle.

Definition at line 768 of file Rectangle.h.

References pcl::IsNormalRect().

◆ IsOrdered()

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

Returns true iff this is an ordered rectangle.

Definition at line 776 of file Rectangle.h.

References pcl::IsOrderedRect().

◆ IsPoint()

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

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

Definition at line 719 of file Rectangle.h.

References pcl::IsPoint().

◆ IsPointOrLine()

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

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

Definition at line 751 of file Rectangle.h.

References pcl::IsPointOrLine().

◆ IsRect()

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

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

Definition at line 760 of file Rectangle.h.

References pcl::IsRect().

◆ IsVerticalLine()

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

Returns true iff this rectangle defines a vertical line.

Definition at line 743 of file Rectangle.h.

References pcl::IsVerticalLine().

◆ Left()

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

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

Definition at line 489 of file Rectangle.h.

◆ LeftBottom()

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

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

Definition at line 559 of file Rectangle.h.

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

◆ LeftTop()

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

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

Definition at line 525 of file Rectangle.h.

References pcl::Min().

◆ ManhattanDistance()

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

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 663 of file Rectangle.h.

◆ MoveBy() [1/3]

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

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 1218 of file Rectangle.h.

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

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

◆ MoveBy() [2/3]

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

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 1229 of file Rectangle.h.

◆ MoveBy() [3/3]

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

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 );

Definition at line 1247 of file Rectangle.h.

◆ MovedBy() [1/2]

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

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

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

Definition at line 1269 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
inline

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 1283 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
inline

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

GenericRectangle r( *this ); r.MoveTo( p );

Definition at line 1192 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
inline

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

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

Definition at line 1206 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)
inline

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 1156 of file Rectangle.h.

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

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

◆ MoveTo() [2/2]

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

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 1169 of file Rectangle.h.

◆ operator&=()

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

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

Definition at line 1107 of file Rectangle.h.

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

◆ operator*=() [1/3]

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

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 1971 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ operator*=() [2/3]

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

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 1995 of file Rectangle.h.

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

◆ operator*=() [3/3]

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

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 2018 of file Rectangle.h.

◆ operator+()

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

Returns a copy of this rectangle.

Definition at line 2122 of file Rectangle.h.

◆ operator+=() [1/3]

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

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 1811 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ operator+=() [2/3]

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

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 1834 of file Rectangle.h.

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

◆ operator+=() [3/3]

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

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 1857 of file Rectangle.h.

◆ operator-()

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

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 2133 of file Rectangle.h.

◆ operator-=() [1/3]

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

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 1891 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ operator-=() [2/3]

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

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 1914 of file Rectangle.h.

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

◆ operator-=() [3/3]

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

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 1937 of file Rectangle.h.

◆ operator/=() [1/3]

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

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 2049 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ operator/=() [2/3]

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

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 2075 of file Rectangle.h.

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

◆ operator/=() [3/3]

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

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 2099 of file Rectangle.h.

◆ operator=() [1/3]

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

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

Definition at line 1751 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

◆ operator=() [2/3]

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

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 1768 of file Rectangle.h.

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

◆ operator=() [3/3]

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

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 1781 of file Rectangle.h.

◆ operator|=()

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

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

Definition at line 1034 of file Rectangle.h.

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

◆ Order()

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

Orders the coordinates of this rectangle.

Definition at line 784 of file Rectangle.h.

References pcl::OrderRect().

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

◆ Ordered()

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

Returns an ordered rectangle equivalent to this.

Definition at line 792 of file Rectangle.h.

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

◆ Perimeter()

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

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

Definition at line 651 of file Rectangle.h.

◆ ResizeBy()

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

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 1340 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
inline

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 1360 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
inline

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

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

Definition at line 1321 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 
)
inline

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 1301 of file Rectangle.h.

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

◆ Right()

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

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

Definition at line 507 of file Rectangle.h.

◆ RightBottom()

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

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

Definition at line 576 of file Rectangle.h.

References pcl::Max().

◆ RightTop()

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

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

Definition at line 542 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,
T2  xc,
T2  yc 
)
inline

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 1557 of file Rectangle.h.

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

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

◆ Rotate() [2/4]

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

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

Definition at line 1569 of file Rectangle.h.

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

◆ Rotate() [3/4]

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

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 1580 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,
const GenericPoint< T2 > &  center 
)
inline

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 1592 of file Rectangle.h.

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

◆ Rotated() [1/4]

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

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 1603 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,
const GenericPoint< T2 > &  center 
) const
inline

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 1616 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,
T2  xc,
T2  yc 
) const
inline

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 1630 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,
const GenericPoint< T2 > &  center 
) const
inline

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 1644 of file Rectangle.h.

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

◆ Round() [1/2]

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

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

Definition at line 1655 of file Rectangle.h.

References pcl::Round().

◆ Round() [2/2]

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

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

Definition at line 1667 of file Rectangle.h.

References pcl::Round().

◆ Rounded() [1/2]

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

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

Definition at line 1682 of file Rectangle.h.

References pcl::Round().

◆ Rounded() [2/2]

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

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

Definition at line 1692 of file Rectangle.h.

References pcl::Round().

◆ RoundedToInt()

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

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

Definition at line 1703 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 
)
inline

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 1140 of file Rectangle.h.

◆ SetHeight()

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

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 1393 of file Rectangle.h.

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

◆ SetWidth()

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

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 1376 of file Rectangle.h.

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

◆ Top()

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

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

Definition at line 498 of file Rectangle.h.

◆ TopLeft()

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

A synonym for LeftTop().

Definition at line 533 of file Rectangle.h.

◆ TopRight()

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

A synonym for RightTop().

Definition at line 550 of file Rectangle.h.

◆ Truncate()

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

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 1714 of file Rectangle.h.

References pcl::Trunc().

◆ Truncated()

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

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 1728 of file Rectangle.h.

References pcl::Trunc().

◆ TruncatedToInt()

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

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 1740 of file Rectangle.h.

References pcl::TruncInt().

◆ Union()

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

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

Definition at line 1022 of file Rectangle.h.

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

◆ Unite() [1/2]

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

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

Definition at line 994 of file Rectangle.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.

Referenced by pcl::GenericRectangle< T >::operator|=(), and 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 
)
inline

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 1010 of file Rectangle.h.

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

◆ Width()

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

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

Definition at line 633 of file Rectangle.h.

References pcl::Abs().

◆ WidthSetTo()

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

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 1530 of file Rectangle.h.

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


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