Easy3D 2.5.3
GenericRect< FT > Class Template Reference

The GenericRect class defines a rectangle in the 2D space. More...

#include <easy3d/core/rect.h>

Public Member Functions

 GenericRect (const Vec< 2, FT > &p, const Vec< 2, FT > &q)
 Constructs a rectangle from two points p and q.
 
 GenericRect (FT xmin, FT xmax, FT ymin, FT ymax)
 Constructs a rectangle from its min coordinates (xmin and ymin) and max coordinates (xmax and ymax).
 
FT & x_min ()
 
FT & y_min ()
 
FT & x_max ()
 
FT & y_max ()
 
FT x_min () const
 
FT y_min () const
 
FT x_max () const
 
FT y_max () const
 
FT & x ()
 
FT & y ()
 
FT x () const
 
FT y () const
 
FT width () const
 Returns the width of the rectangle.
 
FT height () const
 Returns the height of the rectangle.
 
FT & left ()
 
FT & top ()
 
FT & right ()
 
FT & bottom ()
 
FT left () const
 
FT top () const
 
FT right () const
 
FT bottom () const
 
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
 
Vec< 2, FT > max_point () const
 
Vec< 2, FT > center () const
 Returns the center point of the rectangle.
 

Detailed Description

template<typename FT>
class easy3d::GenericRect< FT >

The GenericRect class defines a rectangle in the 2D space.

A rectangle is normally expressed as a top-left corner and a size (width and height).

Examples
Tutorial_207_RealCamera, Tutorial_306_Image, Tutorial_403_PointSelection, Tutorial_501_AmbientOcclusion, and Tutorial_506_DepthMaps.

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