Rectangle Class Reference
To store and treat a rectangular figure. More...
#include <Figure.h>

Public Member Functions | |
Rectangle () | |
Default constructor. | |
Rectangle (const Point< real_t > &bbm, const Point< real_t > &bbM, int code=1) | |
Constructor. | |
void | setBoundingBox (const Point< real_t > &bbm, const Point< real_t > &bbM) |
Assign bounding box of the rectangle. | |
Point< real_t > | getBoundingBox1 () const |
Return first point of bounding box. | |
Point< real_t > | getBoundingBox2 () const |
Return second point of bounding box. | |
real_t | getSignedDistance (const Point< real_t > &p) const |
Return signed distance of a given point from the current rectangle. | |
Rectangle & | operator+= (Point< real_t > a) |
Operator +=. | |
Rectangle & | operator+= (real_t a) |
Operator *=. | |
virtual real_t | getSignedDistance (const Point< real_t > &p) const |
Return signed distance from a given point to current figure. | |
void | getSignedDistance (const Grid &g, Vect< real_t > &d) const |
Calculate signed distance to current figure with respect to grid points. | |
![]() | |
Figure () | |
Default constructor. | |
Figure (const Figure &f) | |
Copy constructor. | |
virtual | ~Figure () |
Destructor. | |
void | setCode (int code) |
Choose a code for the domain defined by the figure. | |
Figure & | operator= (const Figure &f) |
Operator =. | |
void | getSignedDistance (const Grid &g, Vect< real_t > &d) const |
Calculate signed distance to current figure with respect to grid points. | |
real_t | dLine (const Point< real_t > &p, const Point< real_t > &a, const Point< real_t > &b) const |
Compute signed distance from a line. | |
Detailed Description
To store and treat a rectangular figure.
Constructor & Destructor Documentation
◆ Rectangle()
Constructor.
- Parameters
-
[in] bbm Left Bottom point of rectangle [in] bbM Right Top point of rectangle [in] code Code to assign to rectangle
Member Function Documentation
◆ getSignedDistance() [1/3]
◆ getSignedDistance() [2/3]
|
virtual |
◆ getSignedDistance() [3/3]
|
virtual |
Return signed distance of a given point from the current rectangle.
The computed distance is negative if p
lies in the rectangle, negative if it is outside, and 0
on its boundary
- Parameters
-
[in] p Point<double> instance
Reimplemented from Figure.
◆ operator+=() [1/2]
◆ operator+=() [2/2]
Rectangle & operator+= | ( | real_t | a | ) |
Operator *=.
Scale rectangle by a factor a