Public Member Functions | |
| Box () | |
| Box (const DbU::Unit &x, const DbU::Unit &y) | |
| Box (const Point &point) | |
| Box (const DbU::Unit &x1, const DbU::Unit &y1, const DbU::Unit &x2, const DbU::Unit &y2) | |
| Box (const Point &point1, const Point &point2) | |
| Box (const Box &box) | |
| Box & | operator= (const Box &box) |
| bool | operator== (const Box &box) const |
| bool | operator!= (const Box &box) const |
| const DbU::Unit & | getXMin () const |
| const DbU::Unit & | getYMin () const |
| const DbU::Unit & | getXMax () const |
| const DbU::Unit & | getYMax () const |
| DbU::Unit | getXCenter () const |
| DbU::Unit | getYCenter () const |
| Point | getCenter () const |
| DbU::Unit | getWidth () const |
| DbU::Unit | getHalfWidth () const |
| DbU::Unit | getHeight () const |
| DbU::Unit | getHalfHeight () const |
| Box | getUnion (const Box &box) const |
| Box | getIntersection (const Box &box) const |
| bool | isEmpty () const |
| bool | isFlat () const |
| bool | isPonctual () const |
| bool | contains (const DbU::Unit &x, const DbU::Unit &y) const |
| bool | contains (const Point &point) const |
| bool | contains (const Box &box) const |
| bool | intersect (const Box &box) const |
| bool | isConstrainedBy (const Box &box) const |
| Box & | makeEmpty () |
| Box & | inflate (const DbU::Unit &d) |
| Box & | inflate (const DbU::Unit &dx, const DbU::Unit &dy) |
| Box & | inflate (const DbU::Unit &dxMin, const DbU::Unit &dyMin, const DbU::Unit &dxMax, const DbU::Unit &dyMax) |
| Box & | merge (const DbU::Unit &x, const DbU::Unit &y) |
| Box & | merge (const Point &point) |
| Box & | merge (const DbU::Unit &x1, const DbU::Unit &y1, const DbU::Unit &x2, const DbU::Unit &y2) |
| Box & | merge (const Box &box) |
| Box & | translate (const DbU::Unit &dx, const DbU::Unit &dy) |
Box description (API)
Those objects represent rectangular boxes. They are defined by the values XMin, YMin, XMax and YMax which are representatives only when the box is not empty. A box is considered empty whenever it is not initialized or when it doesn't represent a real area like the intersection of two disjoint boxes.
All the function described in the modifiers section returns a reference on the modified box, providing so the capability to apply to it a new modification as illustrated in the following example :
| Hurricane::Box::Box | ( | ) |
Default constructor : the returned box is empty.
Builds a box of null size centered on the point defined by <x> and <y>.
| Hurricane::Box::Box | ( | const Point & | point | ) |
Builds a box of null size centered on the point.
| Hurricane::Box::Box | ( | const DbU::Unit & | x1, |
| const DbU::Unit & | y1, | ||
| const DbU::Unit & | x2, | ||
| const DbU::Unit & | y2 | ||
| ) |
Builds the minimal box enclosing the two points defined by the coordinates <x1>, <y1> and <x2>, <y2>.
Builds the minimal box enclosing the two points.
| Hurricane::Box::Box | ( | const Box & | box | ) |
Copy constructor.
| bool Hurricane::Box::operator== | ( | const Box & | box | ) | const |
Equality operator.
| bool Hurricane::Box::operator!= | ( | const Box & | box | ) | const |
Difference operator.
|
inline |
Returns: the XMin value : meaningful only for a non empty box.
|
inline |
Returns: the YMin value : meaningful only for a non empty box.
|
inline |
Returns: the XMax value : meaningful only for a non empty box.
|
inline |
Returns: the YMax value : meaningful only for a non empty box.
|
inline |
Returns: the abscissa of the box center : meaningful only for a non empty box.
Referenced by getCenter().
|
inline |
Returns: the ordinate of the box center : meaningful only for a non empty box.
Referenced by getCenter().
|
inline |
Returns: the box center point : meaningful only for a non empty box.
References getXCenter(), and getYCenter().
|
inline |
Returns: the box width : meaningful only for a non empty box.
Referenced by getHalfWidth().
|
inline |
Returns: the half box width : meaningful only for a non empty box.
References getWidth().
|
inline |
Returns: the box height : meaningful only for a non empty box.
Referenced by getHalfHeight().
|
inline |
Returns: the half box height : meaningful only for a non empty box.
References getHeight().
Returns: the smallest enclosing box containing the boxes <this> and <box>. The returned box may be empty if both are.
Returns: box representing the overlapping area. This box is empty if either one of the two boxes is empty or if they are disjoint.
| bool Hurricane::Box::isEmpty | ( | ) | const |
Returns: true if the box is empty, else false.
| bool Hurricane::Box::isFlat | ( | ) | const |
Returns: true if the box is non void and if we have either ((XMin==XMax) an (YMin<YMax)) or ((XMin<XMax) and (YMin==YMax)).
| bool Hurricane::Box::isPonctual | ( | ) | const |
Returns: true if the box is reduced to a point, else false.
Returns: true if the box is non empty and contains the point defined by the coordinates <x>, <y> else false.
| bool Hurricane::Box::contains | ( | const Point & | point | ) | const |
Returns: true if the box is non empty and contains the point <point>, else false.
| bool Hurricane::Box::contains | ( | const Box & | box | ) | const |
Returns: true if the two boxes are non empty and if the box <this> contains the box <box>, else false.
| bool Hurricane::Box::intersect | ( | const Box & | box | ) | const |
Returns: true if the two boxes are non empty and if they overlap, else false.
| bool Hurricane::Box::isConstrainedBy | ( | const Box & | box | ) | const |
Returns: true if the two boxes are non empty, if the box <this> contains the box <box> and if those two boxes have at least a common border side, else false.
| Box & Hurricane::Box::makeEmpty | ( | ) |
Transforms the box into an empty one.
Expands (or contracts) the box, if not empty, in each direction of the quantity <d>. This quantity might be negative enough to transform it into an empty box.
Expands (or contracts) the box, if not empty, horizontaly of the quantity <dx> and vertically of the quatity <dy>. Those quantities might be negative enough to transform it into an empty box.
| Box & Hurricane::Box::inflate | ( | const DbU::Unit & | dxMin, |
| const DbU::Unit & | dyMin, | ||
| const DbU::Unit & | dxMax, | ||
| const DbU::Unit & | dyMax | ||
| ) |
Expands (or contracts) the box, if not empty, on the left of the quantity <dxMin>, on the bottom of the quantity <dyMin>, on the right of the quantity <dxMax> and on the top of the quantity <dyMax>. Those quantities might be negative enough to transform it into an empty box.
Expands the box in order that it encloses the point defined by coordinates <x> and <y>. If the box was initially empty it becomes reduced to the enclosed point.
Expands the box in order that it encloses the point <point>. If the box was initially empty it becomes reduced to the enclosed point.
| Box & Hurricane::Box::merge | ( | const DbU::Unit & | x1, |
| const DbU::Unit & | y1, | ||
| const DbU::Unit & | x2, | ||
| const DbU::Unit & | y2 | ||
| ) |
Expands the box in order that it encloses the points defined by coordinates <x1>, <y1> and <x2>, <y2>.
Expands the box in order that it encloses, if not empty, the box <box>. If the box <this> was initially empty it becomes reduced to the enclosed box.
translates the box, if not empty, of the quantities <dx> and <dy>.
| Generated by doxygen 1.9.1 on Wed Nov 20 2024 | Return to top of page |
| Hurricane VLSI Database | Copyright © 2000-2020 Bull S.A. All rights reserved |