Public Methods | |
oaBox () | |
oaBox (oaCoord leftIn, oaCoord bottomIn, oaCoord rightIn, oaCoord topIn) | |
oaBox (const oaPoint &lowerLeftIn, const oaPoint &upperRightIn) | |
oaBox (const oaPoint ¢er, const oaUInt4 size) | |
oaBox (const oaBox &box, const oaTransform &xform) | |
oaPoint & | lowerLeft () |
oaPoint & | upperRight () |
oaCoord & | left () |
oaCoord & | bottom () |
oaCoord & | right () |
oaCoord & | top () |
const oaPoint & | lowerLeft () const |
const oaPoint & | upperRight () const |
oaCoord | left () const |
oaCoord | bottom () const |
oaCoord | right () const |
oaCoord | top () const |
void | set (oaCoord leftIn=INT_MAX, oaCoord bottomIn=INT_MAX, oaCoord rightIn=INT_MIN, oaCoord topIn=INT_MIN) |
void | set (const oaPoint &lowerLeftIn, const oaPoint &upperRightIn) |
void | set (const oaPoint ¢er, const oaUInt4 size) |
void | set (const oaBox &box, const oaTransform &xform) |
oaUInt4 | getWidth () const |
oaUInt4 | getHeight () const |
void | getCenter (oaPoint &result) const |
void | getLowerRight (oaPoint &result) const |
void | getUpperLeft (oaPoint &result) const |
oaBoolean | hasNoArea () const |
oaBoolean | isInverted () const |
oaBoolean | overlaps (const oaBox &box, oaBoolean incEdges=true) const |
oaBoolean | overlaps (const oaSegment &seg, oaBoolean incEdges=true) const |
oaBoolean | contains (const oaBox &box, oaBoolean incEdges=true) const |
oaBoolean | contains (const oaPoint &point, oaBoolean incEdges=true) const |
oaDouble | distanceFrom2 (const oaPoint &point) const |
void | fix (oaBox &result) const |
void | fix () |
void | transform (const oaTransform &xform, oaBox &result) const |
void | transform (const oaTransform &xform) |
void | transform (const oaPoint &offset, oaBox &result) const |
void | transform (const oaPoint &offset) |
void | transform (oaDouble scale, oaDouble angle, oaBox &result) const |
void | transform (oaDouble scale, oaDouble angle) |
void | scale (oaFloat scale) |
void | merge (const oaBox &box, oaBox &result) const |
void | merge (const oaBox &box) |
void | merge (const oaPoint &point, oaBox &result) const |
void | merge (const oaPoint &point) |
void | intersection (const oaBox &box, oaBox &result) const |
void | intersection (const oaBox &box) |
void | makeZero () |
void | makeInvertedZero () |
void | init () |
void | toPoints (oaPoint *points) const |
oaBoolean | operator== (const oaBox &bBox) const |
oaBoolean | operator!= (const oaBox &bBox) const |
Friends | |
class | oaChecker< oaBox > |
If coordinates are stored in a bounding box such that the left value is greater than the right value, or the bottom value is greater than the top value, then the bounding box is referred to as inverted. Inverted bounding boxes are used to indicate that no valid bounding coordinates are present.
The coordinates are in integer data base units (DBUs) which get mapped to defined distances by settings in the technology data base. See oaTech::getDBUPerUU for more. When the data base units are set to 1000 per micron, the coordinate range for OpenAccess is +/-2.147 meters.
|
This function constructs an uninitialized oaBox object. Accessing the coordinates in a box at this point has indeterminate results. |
|
This function constructs a box from individual left, bottom, right, and top side coordinates of the box.
|
|
This function constructs a box from two oaPoint values. The two oaPoint values define the lower-left and upper right corners of the box.
|
|
This function constructs a square box centered about the specified oaPoint with each side set to the specified size from the center.
|
|
This function creates a transformed copy of the specified box.
|
|
This function returns the value of the bottom coordinate attribute of this box. This is an accessor function, and you cannot modify the attribute. |
|
This function returns a reference to the bottom coordinate attribute of this box. You can change the value of the attribute bottom. |
|
This function returns a boolean value indicating whether the specified point is within or touching the box. The incEdges argument determines if the specified point is considered within this box if the point is on the edge of this box.
|
|
This function returns a boolean value indicating whether this box completely overlaps the specified box. The incEdges argument determines if the specified box is considered contained in this box if the edges are touching.
|
|
This function returns the square of the distance from the specified point to the closest point on the boundary of this box. Note: The result of this function is meaningful only for non-inverted boxes.
|
|
This function verifies this box is not inverted by checking that the left coordinate is less than or equal to the right coordinate, and the bottom coordinate is less than or equal to the top coordinate. If the box is inverted, the coordinates are swapped. The original box is modified to reflect the new coordinates. |
|
This function verifies that this box is not inverted by checking that the left coordinate is less than or equal to the right coordinate, and that the bottom coordinate is less than or equal to the top coordinate. If the box is inverted, the coordinates are swapped and the corrected box is stored in result, which must not be the original box. The original box is not changed.
|
|
This function calculates the center of this box and stores the resulting point in the specified location.
|
|
This function returns the height of this oaBox. Note: The result of this function is meaningful only for non-inverted boxes. |
|
This function calculates the lower right corner of this box and stores the resulting point in the specified location.
|
|
This function calculates the upper-left corner of this box and stores the resulting point in the specified location.
|
|
This function returns the width of this oaBox. Note: The result of this function is meaningful only for non-inverted boxes. |
|
This function returns a boolean value indicating whether this box has a zero area. This value is true if either the left and right coordinates are equal, or the bottom and top coordinates are equal.
|
|
This function sets the left and bottom coordinates of this bounding box to the extreme positive values and the right and top coordinates to the extreme negative values. This inverted value is useful as an initial condition when you want to merge several boxes. |
|
This function calculates the intersection between this box and the specified box. The result is stored in place of the original. If the boxes do not intersect, the result is an inverted box. Note: The result of this function is meaningful only for non-inverted boxes.
|
|
This function calculates the intersection between this box and the specified box. The result is stored in the specified location. If the boxes do not intersect, the result is an inverted value. Note: The result of this function is meaningful only for non-inverted boxes.
|
|
This function returns a boolean value indicating whether this box has an inverted height or width value.
|
|
This function returns the value of the left coordinate attribute of this box. This is an accessor function, and you cannot modify the attribute. |
|
This function returns a reference to the left coordinate attribute of this box. You can change the value of the attribute left. |
|
This function returns the value of the lower-left point of this box. This is an accessor function, and you cannot modify the attributes. |
|
This function returns a reference to the lower-left point of this box. You can change the value of the left and bottom attributes. |
|
This function sets all coordinates of this box to zero if the box was inverted. |
|
This function sets all coordinates of this box to zero. |
|
This function calculates the union of this box with the specified point and stores the result in the original box.
|
|
This function calculates the union of this box with the specified point and stores the result in the specified location.
|
|
This function calculates the union of this box with the specified box and stores the result in place of the original box.
|
|
This function calculates the union of this box with the specified box and stores the result in the specified location.
|
|
This is the inequality operator for the oaBox class. It compares this box with the specified bBox, and returns true if the boxes are unequal. |
|
This is the equality operator for the oaBox class. It compares this box with the specified bBox, and returns true if the boxes are equal. |
|
This function returns a boolean value indicating whether this box overlaps, touches, or contains the specified segment. The argument 'incEdges' specifies whether the segment is considered to overlap this box if it touches the edge.
|
|
This function returns a boolean value indicating whether or not this box overlaps or touches the specified box. The argument 'incEdges' specifies whether the box is considered to overlap this box if it touches the edge.
|
|
This function returns the value of the right coordinate attribute of this box. This is an accessor function, and you cannot modify the attribute. |
|
This function returns a reference to the right coordinate attribute of this box. You can change the value of the attribute right. |
|
This function scales this box, keeping its center the same. The resulting box will be scaled as precisely as it can be presented by integer coordinates. The original box is modified to reflect this change. Note: The result of this function is valid only for non-inverted boxes.
|
|
This function sets this box to a transformed copy of the specified box.
|
|
This function sets this box to a square that is centered about the specified oaPoint with each side set to the specified size from the center.
|
|
This function sets this box to the specified lower-left and upper-right points.
|
|
This function sets this box to the specified coordinates. The coordinates specify the left, bottom, right, and top sides of the box. All coordinates have default values that set the left and bottom coordinates to the most extreme positive values, and the right and top coordinates to the most extreme negative values. This is known as an inverted box and can be used to indicate a box that is uninitialized. Note: The isInverted() function returns true after calling set() without any arguments.
|
|
This function returns the value of the top coordinate attribute of this box. This is an accessor function, and you cannot modify the attribute. |
|
This function returns a reference to the top coordinate attribute of this box. You can change the value of the attribute top. |
|
This function fills out points with the four points that define this box. It is assumed that points are already allocated and the points are at least four points in length. The points are written in clockwise order starting from the lower left point.
|
|
This function transforms this box by the specified scale factor and rotation angle. The angle can be an arbitrary angle, and the result of the transform will be exact if the angle specified is orthogonal. If the angle is non-orthogonal, the resulting transform will be as precise as can possibly be presented by integer coordinates. The original box is modified to reflect this transform. |
|
This function transforms this box by the specified scale factor and rotation angle and stores the resulting transform in result, which may be the original box. The angle can be an arbitrary angle, and the result of the transform will be exact if the angle specified is orthogonal. If the angle is non-orthogonal, the resulting transform will be as precise as can possibly be presented by integer coordinates. |
|
This function transforms this box by the specified offset. The original box is modified to reflect this transform.
|
|
This function transforms this box by the specified offset and stores the result in the specified location, which may be the original box.
|
|
This function transforms this box by the specified transform. The original box is modified to reflect this transform.
|
|
This function transforms this box by the specified transform and stores the result in the specified location, which may be the original box.
|
|
This function returns the value of the upper-right point of this box. This is an accessor function, and you cannot modify the attributes. |
|
This function returns a reference to the upper-right point of this box. You can change the value of the attributes right and top. |
|
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.