PCL
|
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 |
void | InflateByFactor (double k) noexcept |
void | InflateByFactors (double kx, double ky) noexcept |
template<typename T1 > | |
GenericRectangle | InflatedBy (T1 d) const noexcept |
template<typename T1 > | |
GenericRectangle | InflatedBy (T1 dx, T1 dy) const noexcept |
GenericRectangle | InflatedByFactor (double k) noexcept |
GenericRectangle | InflatedByFactors (double kx, double ky) 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 > | |
GenericRectangle & | operator&= (const GenericRectangle< T1 > &r) noexcept |
GenericRectangle & | operator*= (component d) noexcept |
template<typename T1 > | |
GenericRectangle & | operator*= (const GenericRectangle< T1 > &r) noexcept |
template<typename T1 > | |
GenericRectangle & | operator*= (const pcl::GenericPoint< T1 > &p) noexcept |
GenericRectangle | operator+ () const noexcept |
GenericRectangle & | operator+= (component d) noexcept |
template<typename T1 > | |
GenericRectangle & | operator+= (const GenericRectangle< T1 > &r) noexcept |
template<typename T1 > | |
GenericRectangle & | operator+= (const pcl::GenericPoint< T1 > &p) noexcept |
GenericRectangle | operator- () const noexcept |
GenericRectangle & | operator-= (component d) noexcept |
template<typename T1 > | |
GenericRectangle & | operator-= (const GenericRectangle< T1 > &r) noexcept |
template<typename T1 > | |
GenericRectangle & | operator-= (const pcl::GenericPoint< T1 > &p) noexcept |
GenericRectangle & | operator/= (component d) noexcept |
template<typename T1 > | |
GenericRectangle & | operator/= (const GenericRectangle< T1 > &r) noexcept |
template<typename T1 > | |
GenericRectangle & | operator/= (const pcl::GenericPoint< T1 > &p) noexcept |
GenericRectangle & | operator= (component d) noexcept |
template<typename T1 > | |
GenericRectangle & | operator= (const GenericRectangle< T1 > &r) noexcept |
template<typename T1 > | |
GenericRectangle & | operator= (const pcl::GenericPoint< T1 > &p) noexcept |
template<typename T1 > | |
GenericRectangle & | operator|= (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 > ¢er) 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 > ¢er) 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 > ¢er) 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 > ¢er) 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. | |
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>.
Definition at line 313 of file Rectangle.h.
using pcl::GenericRectangle< T >::component = T |
Represents the type of a point or rectangle component.
Definition at line 320 of file Rectangle.h.
using pcl::GenericRectangle< T >::point = GenericPoint<component> |
Represents a point on the plane.
Definition at line 325 of file Rectangle.h.
|
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.
|
inlineconstexpr |
Constructs a GenericRectangle instance given by its coordinates in the plane.
left,top | Coordinates of the upper left corner. |
right,bottom | Coordinates 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.
|
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:
is functionally equivalent to:
Definition at line 392 of file Rectangle.h.
|
inline |
Constructs a GenericRectangle instance given two points in the plane.
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.
|
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.
|
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.
|
inline |
Nontrivial copy constructor. Constructs a GenericRectangle instance as a copy of the specified rectangle r.
Definition at line 464 of file Rectangle.h.
|
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().
|
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.
|
inlinenoexcept |
A synonym for LeftBottom().
Definition at line 569 of file Rectangle.h.
|
inlinenoexcept |
A synonym for RightBottom().
Definition at line 586 of file Rectangle.h.
Referenced by pcl::QuadTree< T >::Node::SERect().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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.
|
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.
|
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.
|
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.
|
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 1708 of file Rectangle.h.
|
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 1690 of file Rectangle.h.
Referenced by pcl::GenericRectangle< T >::DeflatedBy().
|
inlinenoexcept |
Returns a rectangle equivalent to this rectangle shrunk by the specified d increment on both axes.
Definition at line 1738 of file Rectangle.h.
References pcl::GenericRectangle< T >::DeflateBy().
|
inlinenoexcept |
Returns a rectangle equivalent to this rectangle shrunk by the specified dx and dy increments.
Definition at line 1726 of file Rectangle.h.
References pcl::GenericRectangle< T >::DeflateBy().
|
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().
|
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().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle resized vertically to the specified height h:
Definition at line 1766 of file Rectangle.h.
References pcl::GenericRectangle< T >::SetHeight().
|
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.
|
inlinenoexcept |
Returns true iff this rectangle completely includes a rectangle r.
Definition at line 876 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle includes a point p.
Definition at line 867 of file Rectangle.h.
|
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.
|
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.
|
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.
|
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.
|
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().
|
inlinenoexcept |
Inflates this rectangle by the specified factor k with respect to the current width and height. This function is equivalent to:
Definition at line 1655 of file Rectangle.h.
Referenced by pcl::GenericRectangle< T >::InflatedByFactor().
|
inlinenoexcept |
Inflates this rectangle by the specified factors kx and ky with respect to the current width and height, respectively. This function is equivalent to:
Definition at line 1644 of file Rectangle.h.
Referenced by pcl::GenericRectangle< T >::InflatedByFactors().
|
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().
|
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().
|
inlinenoexcept |
Returns a rectangle equivalent to this rectangle inflated by the specified factor k with respect to the current width and height. See InflateByFactor() for more information.
Definition at line 1677 of file Rectangle.h.
References pcl::GenericRectangle< T >::InflateByFactor().
|
inlinenoexcept |
Returns a rectangle equivalent to this rectangle inflated by the specified factors kx and ky with respect to the current width and height, respectively. See InflateByFactors() for more information.
Definition at line 1665 of file Rectangle.h.
References pcl::GenericRectangle< T >::InflateByFactors().
|
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().
|
inlinenoexcept |
Causes this rectangle to be equal to its intersection with a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle that will intersect this rectangle. |
right,bottom | Lower 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().
|
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().
|
inlinenoexcept |
Causes this rectangle to be equal to its intersection with a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle that will intersect this rectangle. |
right,bottom | Lower 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:
Definition at line 1241 of file Rectangle.h.
References pcl::IsRect(), pcl::Max(), and pcl::Min().
|
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().
|
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().
|
inlinenoexcept |
Returns true iff this rectangle intersects a rectangle r.
Definition at line 942 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle intersects a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle to test for intersection. |
right,bottom | Lower right corner coordinates of a rectangle to test for intersection. |
Definition at line 931 of file Rectangle.h.
References pcl::OrderRect().
|
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.
|
inlinenoexcept |
Returns true iff this rectangle intersects a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle to test for intersection. |
right,bottom | Lower right corner coordinates of a rectangle to test for intersection. |
For a valid result, this function assumes the following conditions:
Definition at line 974 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle defines a horizontal line.
Definition at line 737 of file Rectangle.h.
References pcl::IsHorizontalLine().
|
inlinenoexcept |
Returns true iff this rectangle defines a line.
Definition at line 729 of file Rectangle.h.
References pcl::IsLine().
|
inlinenoexcept |
Returns true iff this is a normal rectangle.
Definition at line 770 of file Rectangle.h.
References pcl::IsNormalRect().
|
inlinenoexcept |
Returns true iff this is an ordered rectangle.
Definition at line 778 of file Rectangle.h.
References pcl::IsOrderedRect().
|
inlinenoexcept |
Returns true iff this rectangle defines a point in the plane.
Definition at line 721 of file Rectangle.h.
References pcl::IsPoint().
|
inlinenoexcept |
Returns true iff this rectangle defines a point or a line.
Definition at line 753 of file Rectangle.h.
References pcl::IsPointOrLine().
|
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().
|
inlinenoexcept |
Returns true iff this rectangle defines a vertical line.
Definition at line 745 of file Rectangle.h.
References pcl::IsVerticalLine().
|
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.
|
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().
|
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().
|
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.
|
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().
|
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.
|
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:
Definition at line 1422 of file Rectangle.h.
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle moved relative to its current position:
Definition at line 1444 of file Rectangle.h.
References pcl::GenericRectangle< T >::MoveBy().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle moved relative to its current position:
Definition at line 1458 of file Rectangle.h.
References pcl::GenericRectangle< T >::MoveBy().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle moved to the specified location:
Definition at line 1367 of file Rectangle.h.
References pcl::GenericRectangle< T >::MoveTo().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle moved to the specified location:
Definition at line 1381 of file Rectangle.h.
References pcl::GenericRectangle< T >::MoveTo().
|
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().
|
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.
|
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.
|
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 2240 of file Rectangle.h.
|
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 2193 of file Rectangle.h.
|
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 2217 of file Rectangle.h.
|
inlinenoexcept |
Returns a copy of this rectangle.
Definition at line 2344 of file Rectangle.h.
|
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 2079 of file Rectangle.h.
|
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 2033 of file Rectangle.h.
|
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 2056 of file Rectangle.h.
|
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 2355 of file Rectangle.h.
|
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 2159 of file Rectangle.h.
|
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 2113 of file Rectangle.h.
|
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 2136 of file Rectangle.h.
|
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 2321 of file Rectangle.h.
|
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 2271 of file Rectangle.h.
|
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 2297 of file Rectangle.h.
|
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 2003 of file Rectangle.h.
|
inlinenoexcept |
Assigns a rectangle r to this rectangle. Returns a reference to this rectangle.
Definition at line 1973 of file Rectangle.h.
|
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 1990 of file Rectangle.h.
|
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.
|
inlinenoexcept |
Orders the coordinates of this rectangle.
Definition at line 786 of file Rectangle.h.
References pcl::OrderRect().
Referenced by pcl::GenericRectangle< T >::Ordered().
|
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().
|
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.
|
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().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle resized relative to its current dimensions:
Definition at line 1535 of file Rectangle.h.
References pcl::GenericRectangle< T >::ResizeBy().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle resized to the specified dimensions:
Definition at line 1496 of file Rectangle.h.
References pcl::GenericRectangle< T >::ResizeTo().
|
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().
|
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.
|
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().
|
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().
|
inlinenoexcept |
Rotates this rectangle 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::Rotate().
|
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 1779 of file Rectangle.h.
References pcl::Rotate(), and pcl::SinCos().
Referenced by pcl::GenericRectangle< T >::Rotated().
|
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 1814 of file Rectangle.h.
References pcl::Rotate().
|
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 1802 of file Rectangle.h.
References pcl::Rotate().
|
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 1838 of file Rectangle.h.
References pcl::GenericRectangle< T >::Rotate().
|
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 1825 of file Rectangle.h.
References pcl::GenericRectangle< T >::Rotate().
|
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 1866 of file Rectangle.h.
References pcl::GenericRectangle< T >::Rotate().
|
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 1852 of file Rectangle.h.
References pcl::GenericRectangle< T >::Rotate().
|
inlinenoexcept |
Rounds the coordinates of this rectangle to their corresponding nearest integer coordinates.
Definition at line 1877 of file Rectangle.h.
References pcl::Round().
|
inlinenoexcept |
Rounds the coordinates of this rectangle to n fractional digits (n >= 0).
Definition at line 1889 of file Rectangle.h.
References pcl::Round().
|
inlinenoexcept |
Returns a rectangle whose coordinates are the coordinates of this object rounded to their nearest integers.
Definition at line 1904 of file Rectangle.h.
References pcl::Round().
|
inlinenoexcept |
Returns a rectangle whose coordinates are the coordinates of this object rounded to n fractional digits (n >= 0).
Definition at line 1914 of file Rectangle.h.
References pcl::Round().
|
inlinenoexcept |
Returns a rectangle of integer template type whose coordinates are the coordinates of this object rounded to their nearest integers.
Definition at line 1925 of file Rectangle.h.
References pcl::RoundInt().
|
inlinenoexcept |
Sets the four coordinates of this rectangle to the specified values.
left,top | New upper left corner coordinates. |
right,bottom | New lower right corner coordinates. |
Definition at line 1315 of file Rectangle.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().
|
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().
|
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.
|
inlinenoexcept |
A synonym for LeftTop().
Definition at line 535 of file Rectangle.h.
Referenced by pcl::QuadTree< T >::Node::NWRect().
|
inlinenoexcept |
A synonym for RightTop().
Definition at line 552 of file Rectangle.h.
|
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 1936 of file Rectangle.h.
References pcl::Trunc().
|
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 1950 of file Rectangle.h.
References pcl::Trunc().
|
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 1962 of file Rectangle.h.
References pcl::TruncInt().
|
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().
|
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().
|
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().
|
inlinenoexcept |
Causes this rectangle to include a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle that will be included by this rectangle. |
right,bottom | Lower 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().
|
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().
|
inlinenoexcept |
Causes this rectangle to include a rectangle specified by its individual coordinates.
left,top | Upper left corner coordinates of a rectangle that will be included by this rectangle. |
right,bottom | Lower right corner coordinates of a rectangle that will be included by this rectangle. |
For a valid result, this function assumes the following conditions:
Definition at line 1075 of file Rectangle.h.
References pcl::Max(), and pcl::Min().
|
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().
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle resized horizontally to the specified width w:
Definition at line 1752 of file Rectangle.h.
References pcl::GenericRectangle< T >::SetWidth().