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 > | |
ClipFlags | ClipCodeFast (const pcl::GenericPoint< T1 > &p) const noexcept |
template<typename T1 > | |
ClipFlags | ClipCodeFast (T1 x, T1 y) const noexcept |
template<typename T1 > | |
bool | ClipLine (pcl::GenericPoint< T1 > &p0, pcl::GenericPoint< T1 > &p1) const noexcept |
template<typename T1 > | |
bool | ClipLine (T1 &lx0, T1 &ly0, T1 &lx1, T1 &ly1) const noexcept |
template<typename T1 > | |
bool | ClipLineFast (pcl::GenericPoint< T1 > &p0, pcl::GenericPoint< T1 > &p1) const noexcept |
template<typename T1 > | |
bool | ClipLineFast (T1 &lx0, T1 &ly0, T1 &lx1, T1 &ly1) 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 315 of file Rectangle.h.
using pcl::GenericRectangle< T >::component = T |
Represents the type of a point or rectangle component.
Definition at line 322 of file Rectangle.h.
using pcl::GenericRectangle< T >::point = GenericPoint<component> |
Represents a point on the plane.
Definition at line 327 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 343 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 359 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 394 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 427 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 442 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 455 of file Rectangle.h.
|
inline |
Nontrivial copy constructor. Constructs a GenericRectangle instance as a copy of the specified rectangle r.
Definition at line 466 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 676 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 520 of file Rectangle.h.
|
inlinenoexcept |
A synonym for LeftBottom().
Definition at line 571 of file Rectangle.h.
|
inlinenoexcept |
A synonym for RightBottom().
Definition at line 588 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 596 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 612 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 620 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 628 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 604 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 685 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 694 of file Rectangle.h.
|
inlinenoexcept |
Given a point p in the plane, this function returns a clip code for the Cohen-Sutherland line clipping algorithm.
The returned value is a combination of flags defined in the Clip namespace.
Definition at line 853 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 Cohen-Sutherland line clipping algorithm.
The returned value is a combination of flags defined in the Clip namespace.
Definition at line 814 of file Rectangle.h.
|
inlinenoexcept |
Given a point p in the plane, this function returns a clip code for the Cohen-Sutherland line clipping algorithm.
The returned value is a combination of flags defined in the Clip namespace.
Definition at line 897 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 Cohen-Sutherland line clipping algorithm.
The returned value is a combination of flags defined in the Clip namespace.
Definition at line 873 of file Rectangle.h.
|
inlinenoexcept |
Computes the clipped line segment coordinates for the specified line endpoints p0 and p1 against this rectangle.
See ClipLine( T1&, T1&, T1&, T1& ) const for a complete description of this function.
Definition at line 983 of file Rectangle.h.
|
inlinenoexcept |
Computes the clipped line segment coordinates for the specified line endpoints lx0, ly0 and lx1, ly1 against this rectangle.
Returns true if the specified line segment intersects this rectangle or is entirely contained by this rectangular region. If an endpoint lies outside this rectangle, its coordinates will be replaced, on output, with the intersection with the corresponding rectangle side or vertex.
Returns false if the specified line segment lies outside this rectangle, in which case the line endpoint coordinates won't be changed.
This function implements the Cohen-Sutherland line clipping algorithm.
Definition at line 919 of file Rectangle.h.
|
inlinenoexcept |
Computes the clipped line segment coordinates for the specified line endpoints p0 and p1 against this rectangle.
See ClipLineFast( T1&, T1&, T1&, T1& ) const for a complete description of this function.
Definition at line 1073 of file Rectangle.h.
|
inlinenoexcept |
Computes the clipped line segment coordinates for the specified line endpoints lx0, ly0 and lx1, ly1 against this rectangle.
Returns true if the specified line segment intersects this rectangle or is entirely contained by this rectangular region. If an endpoint lies outside this rectangle, its coordinates will be replaced, on output, with the intersection with the corresponding rectangle side or vertex.
Returns false if the specified line segment lies outside this rectangle, in which case the line endpoint coordinates won't be changed.
This function implements the Cohen-Sutherland line clipping algorithm.
Definition at line 1009 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 1934 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 1916 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 1964 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 1952 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 715 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 646 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 1992 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 705 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle completely includes a rectangle r.
Definition at line 1102 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle includes a point p.
Definition at line 1093 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle includes a point specified by its separate x and y coordinates.
Definition at line 1083 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle includes a point p.
Definition at line 1141 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle includes a point specified by its separate x and y coordinates.
Definition at line 1128 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 1826 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 1808 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 1881 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 1870 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 1856 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 1844 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 1903 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 1891 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 1374 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 1394 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.
Definition at line 1438 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 1467 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 1481 of file Rectangle.h.
References pcl::GenericRectangle< T >::Intersect().
|
inlinenoexcept |
Returns a rectangle equal to the intersection of this rectangle and another rectangle r.
Definition at line 1496 of file Rectangle.h.
References pcl::GenericRectangle< T >::IntersectFast().
|
inlinenoexcept |
Returns true iff this rectangle intersects a rectangle r.
Definition at line 1168 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 1157 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 1212 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 1200 of file Rectangle.h.
|
inlinenoexcept |
Returns true iff this rectangle defines a horizontal line.
Definition at line 739 of file Rectangle.h.
References pcl::IsHorizontalLine().
|
inlinenoexcept |
Returns true iff this rectangle defines a line.
Definition at line 731 of file Rectangle.h.
References pcl::IsLine().
|
inlinenoexcept |
Returns true iff this is a normal rectangle.
Definition at line 772 of file Rectangle.h.
References pcl::IsNormalRect().
|
inlinenoexcept |
Returns true iff this is an ordered rectangle.
Definition at line 780 of file Rectangle.h.
References pcl::IsOrderedRect().
|
inlinenoexcept |
Returns true iff this rectangle defines a point in the plane.
Definition at line 723 of file Rectangle.h.
References pcl::IsPoint().
|
inlinenoexcept |
Returns true iff this rectangle defines a point or a line.
Definition at line 755 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 764 of file Rectangle.h.
References pcl::IsRect().
|
inlinenoexcept |
Returns true iff this rectangle defines a vertical line.
Definition at line 747 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 493 of file Rectangle.h.
|
inlinenoexcept |
Returns a point with the coordinates of the lower left (left-bottom) corner of this rectangle.
Definition at line 563 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 529 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 667 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 1619 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 1630 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 1648 of file Rectangle.h.
|
inlinenoexcept |
Returns a rectangle r equal to this rectangle moved relative to its current position:
Definition at line 1670 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 1684 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 1593 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 1607 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 1557 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 1570 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 1508 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 2466 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 2419 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 2443 of file Rectangle.h.
|
inlinenoexcept |
Returns a copy of this rectangle.
Definition at line 2570 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 2305 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 2259 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 2282 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 2581 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 2385 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 2339 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 2362 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 2547 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 2497 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 2523 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 2229 of file Rectangle.h.
|
inlinenoexcept |
Assigns a rectangle r to this rectangle. Returns a reference to this rectangle.
Definition at line 2199 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 2216 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 1339 of file Rectangle.h.
|
inlinenoexcept |
Orders the coordinates of this rectangle.
Definition at line 788 of file Rectangle.h.
References pcl::OrderRect().
Referenced by pcl::GenericRectangle< T >::Ordered().
|
inlinenoexcept |
Returns an ordered rectangle equivalent to this.
Definition at line 796 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 655 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 1741 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 1761 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 1722 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 1702 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 511 of file Rectangle.h.
|
inlinenoexcept |
Returns a point with the coordinates of the lower right (right-bottom) corner of this rectangle.
Definition at line 580 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 546 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 2017 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 2005 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 2040 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 2028 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 2064 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 2051 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 2092 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 2078 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 2103 of file Rectangle.h.
References pcl::Round().
|
inlinenoexcept |
Rounds the coordinates of this rectangle to n fractional digits (n >= 0).
Definition at line 2115 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 2130 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 2140 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 2151 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 1541 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 1794 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 1777 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 502 of file Rectangle.h.
|
inlinenoexcept |
A synonym for LeftTop().
Definition at line 537 of file Rectangle.h.
Referenced by pcl::QuadTree< T >::Node::NWRect().
|
inlinenoexcept |
A synonym for RightTop().
Definition at line 554 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 2162 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 2176 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 2188 of file Rectangle.h.
References pcl::TruncInt().
|
inlinenoexcept |
Returns a rectangle that includes this one and another rectangle r.
Definition at line 1313 of file Rectangle.h.
References pcl::GenericRectangle< T >::Unite().
|
inlinenoexcept |
Returns a rectangle that includes this one and another rectangle r.
Definition at line 1327 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 1222 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 1238 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.
Definition at line 1276 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 1301 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 637 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 1978 of file Rectangle.h.
References pcl::GenericRectangle< T >::SetWidth().