The GenericRect class defines a rectangle in the 2D space, where the origin of the coordinate system is located in the top-left corner of the screen.  
 More...
#include <easy3d/core/rect.h>
|  | 
|  | GenericRect (const Vec< 2, FT > &p, const Vec< 2, FT > &q) | 
|  | Constructs a rectangle from two points pandq.
 | 
|  | 
|  | GenericRect (FT xmin, FT xmax, FT ymin, FT ymax) | 
|  | Constructs a rectangle from its min coordinates ( xminandymin) and max coordinates (xmaxandymax).
 | 
|  | 
| FT & | x_min () | 
|  | Returns the minimum x-coordinate. 
 | 
|  | 
| FT & | y_min () | 
|  | Returns the minimum y-coordinate. 
 | 
|  | 
| FT & | x_max () | 
|  | Returns the maximum x-coordinate. 
 | 
|  | 
| FT & | y_max () | 
|  | Returns the maximum y-coordinate. 
 | 
|  | 
| FT | x_min () const | 
|  | Returns the minimum x-coordinate (const version). 
 | 
|  | 
| FT | y_min () const | 
|  | Returns the minimum y-coordinate (const version). 
 | 
|  | 
| FT | x_max () const | 
|  | Returns the maximum x-coordinate (const version). 
 | 
|  | 
| FT | y_max () const | 
|  | Returns the maximum y-coordinate (const version). 
 | 
|  | 
| FT & | x () | 
|  | Returns the minimum x-coordinate (alias for x_min). 
 | 
|  | 
| FT & | y () | 
|  | Returns the minimum y-coordinate (alias for y_min). 
 | 
|  | 
| FT | x () const | 
|  | Returns the minimum x-coordinate (alias for x_min) (const version). 
 | 
|  | 
| FT | y () const | 
|  | Returns the minimum y-coordinate (alias for y_min) (const version). 
 | 
|  | 
| FT | width () const | 
|  | Returns the width of the rectangle. 
 | 
|  | 
| FT | height () const | 
|  | Returns the height of the rectangle. 
 | 
|  | 
| FT & | left () | 
|  | Returns the left coordinate (alias for x_min). 
 | 
|  | 
| FT & | top () | 
|  | Returns the top coordinate (alias for y_min). 
 | 
|  | 
| FT & | right () | 
|  | Returns the right coordinate (alias for x_max). 
 | 
|  | 
| FT & | bottom () | 
|  | Returns the bottom coordinate (alias for y_max). 
 | 
|  | 
| FT | left () const | 
|  | Returns the left coordinate (alias for x_min) (const version). 
 | 
|  | 
| FT | top () const | 
|  | Returns the top coordinate (alias for y_min) (const version). 
 | 
|  | 
| FT | right () const | 
|  | Returns the right coordinate (alias for x_max) (const version). 
 | 
|  | 
| FT | bottom () const | 
|  | Returns the bottom coordinate (alias for y_max) (const version). 
 | 
|  | 
| Vec< 2, FT > | top_left () const | 
|  | Returns the position of the rectangle's top-left corner. 
 | 
|  | 
| Vec< 2, FT > | bottom_right () const | 
|  | Returns the position of the rectangle's bottom-right corner. 
 | 
|  | 
| Vec< 2, FT > | top_right () const | 
|  | Returns the position of the rectangle's top-right corner. 
 | 
|  | 
| Vec< 2, FT > | bottom_left () const | 
|  | Returns the position of the rectangle's bottom-left corner. 
 | 
|  | 
| Vec< 2, FT > | min_point () const | 
|  | Returns the minimum point of the rectangle. 
 | 
|  | 
| Vec< 2, FT > | max_point () const | 
|  | Returns the maximum point of the rectangle. 
 | 
|  | 
| Vec< 2, FT > | center () const | 
|  | Returns the center point of the rectangle. 
 | 
|  | 
template<typename FT>
class easy3d::GenericRect< FT >
The GenericRect class defines a rectangle in the 2D space, where the origin of the coordinate system is located in the top-left corner of the screen. 
A rectangle is normally expressed as a top-left corner and a size (width and height). 
- Template Parameters
- 
  
    | FT | The scalar type for rectangle coordinates. |  
 
◆ GenericRect() [1/2]
Constructs a rectangle from two points p and q. 
- Parameters
- 
  
    | p | The first point. |  | q | The second point. |  
 
 
 
◆ GenericRect() [2/2]
Constructs a rectangle from its min coordinates (xmin and ymin) and max coordinates (xmax and ymax). 
- Parameters
- 
  
    | xmin | The minimum x-coordinate. |  | xmax | The maximum x-coordinate. |  | ymin | The minimum y-coordinate. |  | ymax | The maximum y-coordinate. |  
 
 
 
◆ bottom() [1/2]
Returns the bottom coordinate (alias for y_max). 
- Returns
- The bottom coordinate. 
 
 
◆ bottom() [2/2]
Returns the bottom coordinate (alias for y_max) (const version). 
- Returns
- The bottom coordinate. 
 
 
◆ bottom_left()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > bottom_left | ( |  | ) | const |  | inline | 
 
Returns the position of the rectangle's bottom-left corner. 
- Returns
- The position of the bottom-left corner. 
 
 
◆ bottom_right()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > bottom_right | ( |  | ) | const |  | inline | 
 
Returns the position of the rectangle's bottom-right corner. 
- Returns
- The position of the bottom-right corner. 
 
 
◆ center()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > center | ( |  | ) | const |  | inline | 
 
Returns the center point of the rectangle. 
- Returns
- The center point. 
 
 
◆ height()
Returns the height of the rectangle. 
- Returns
- The height of the rectangle. 
 
 
◆ left() [1/2]
Returns the left coordinate (alias for x_min). 
- Returns
- The left coordinate. 
 
 
◆ left() [2/2]
Returns the left coordinate (alias for x_min) (const version). 
- Returns
- The left coordinate. 
 
 
◆ max_point()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > max_point | ( |  | ) | const |  | inline | 
 
Returns the maximum point of the rectangle. 
- Returns
- The maximum point. 
 
 
◆ min_point()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > min_point | ( |  | ) | const |  | inline | 
 
Returns the minimum point of the rectangle. 
- Returns
- The minimum point. 
 
 
◆ right() [1/2]
Returns the right coordinate (alias for x_max). 
- Returns
- The right coordinate. 
 
 
◆ right() [2/2]
Returns the right coordinate (alias for x_max) (const version). 
- Returns
- The right coordinate. 
 
 
◆ top() [1/2]
Returns the top coordinate (alias for y_min). 
- Returns
- The top coordinate. 
 
 
◆ top() [2/2]
Returns the top coordinate (alias for y_min) (const version). 
- Returns
- The top coordinate. 
 
 
◆ top_left()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > top_left | ( |  | ) | const |  | inline | 
 
Returns the position of the rectangle's top-left corner. 
- Returns
- The position of the top-left corner. 
 
 
◆ top_right()
template<typename FT> 
  
  | 
        
          | Vec< 2, FT > top_right | ( |  | ) | const |  | inline | 
 
Returns the position of the rectangle's top-right corner. 
- Returns
- The position of the top-right corner. 
 
 
◆ width()
Returns the width of the rectangle. 
- Returns
- The width of the rectangle. 
 
 
◆ x() [1/2]
Returns the minimum x-coordinate (alias for x_min). 
- Returns
- The minimum x-coordinate. 
 
 
◆ x() [2/2]
Returns the minimum x-coordinate (alias for x_min) (const version). 
- Returns
- The minimum x-coordinate. 
 
 
◆ x_max() [1/2]
Returns the maximum x-coordinate. 
- Returns
- The maximum x-coordinate. 
 
 
◆ x_max() [2/2]
Returns the maximum x-coordinate (const version). 
- Returns
- The maximum x-coordinate. 
 
 
◆ x_min() [1/2]
Returns the minimum x-coordinate. 
- Returns
- The minimum x-coordinate. 
 
 
◆ x_min() [2/2]
Returns the minimum x-coordinate (const version). 
- Returns
- The minimum x-coordinate. 
 
 
◆ y() [1/2]
Returns the minimum y-coordinate (alias for y_min). 
- Returns
- The minimum y-coordinate. 
 
 
◆ y() [2/2]
Returns the minimum y-coordinate (alias for y_min) (const version). 
- Returns
- The minimum y-coordinate. 
 
 
◆ y_max() [1/2]
Returns the maximum y-coordinate. 
- Returns
- The maximum y-coordinate. 
 
 
◆ y_max() [2/2]
Returns the maximum y-coordinate (const version). 
- Returns
- The maximum y-coordinate. 
 
 
◆ y_min() [1/2]
Returns the minimum y-coordinate. 
- Returns
- The minimum y-coordinate. 
 
 
◆ y_min() [2/2]
Returns the minimum y-coordinate (const version). 
- Returns
- The minimum y-coordinate. 
 
 
The documentation for this class was generated from the following file:
- G:/3_code/Easy3D/easy3d/core/rect.h