oaDonut Class Reference

Inheritance diagram for oaDonut:

oaShape oaPinFig oaConnFig oaFig oaBlockObject oaDesignObject oaObject


Public Methods

void getHoleBBox (oaBox &bBox) const
void getCenter (oaPoint &point) const
oaDist getRadius () const
oaDist getHoleRadius () const
void getBoundary (oaPointArray &points, oaUInt4 numSides=20) const
void setCenter (const oaPoint &center)
void setRadius (oaDist radius)
void setHoleRadius (oaDist holeRadius)
void setRadii (oaDist radius, oaDist holeRadius)
oaPolygonconvertToPolygon (oaUInt4 numSides=20)

Static Public Methods

oaDonut * create (oaBlock *block, oaLayerNum layerNum, oaPurposeNum purposeNum, const oaPoint &center, oaDist radius, oaDist holeRadius)
void genBoundary (const oaPoint &center, oaDist radius, oaDist holeRadius, oaUInt4 numSides, oaPointArray &boundary)

Detailed Description

This class implements a donut shape defined by two concentric circles.


Member Function Documentation

oaPolygon * oaDonut::convertToPolygon oaUInt4    numSides = 20
 

This function converts this donut to a polygon using the specified number of sides. The pointer to the polygon is returned.

Parameters:
numSides The number of segments to represent the donut as a polygon; the default is 20
Exceptions:
oacDonutNumSidesInvalid 

oaDonut * oaDonut::create oaBlock *    block,
oaLayerNum    layerNum,
oaPurposeNum    purposeNum,
const oaPoint &    center,
oaDist    radius,
oaDist    holeRadius
[static]
 

This function creates a donut with the specified attributes. The specified radii are checked to verify the inner radius is less than the outer radius.

Parameters:
block The block in which the donut is created
layerNum The number layer on which the donut is created
purposeNum The number of the purpose on which the donut is created
center The center point for the donut
radius The outer radius for the donut
holeRadius The inner radius for the donut
Exceptions:
oacDonutRadiiInvalid 

void oaDonut::genBoundary const oaPoint &    center,
oaDist    radius,
oaDist    holeRadius,
oaUInt4    numSides,
oaPointArray &    boundary
[static]
 

This function fills out boundary with the bounding polygon of a donut with the specified parameters. The polygon is generated with the number of sides specified by numSides.

Parameters:
center The center point of the donut
radius The outer radius of the donut
holeRadius The inner radius of the donut
numSides The number of sides of the resulting boundary
boundary The point array for the resulting boundary
Exceptions:
oacDonutNumSidesInvalid 

void oaDonut::getBoundary oaPointArray &    points,
oaUInt4    numSides = 20
const
 

This function fills out points with the boundary polygon of this donut. The polygon is generated with the number of sides specified by numSides.

Parameters:
points The point array for the resulting boundary
numSides The number of sides of the resulting boundary
Exceptions:
oacDonutNumSidesInvalid 

void oaDonut::getCenter oaPoint &    point const
 

This function fills out point with the center point of this donut.

Parameters:
point The center of the donut

void oaDonut::getHoleBBox oaBox &    bBox const
 

This function fills out bBox with the hole bBox of this donut.

Parameters:
bBox The bounding box of the donut

oaUInt4 oaDonut::getHoleRadius   const
 

This function returns the inner radius of this donut.

oaUInt4 oaDonut::getRadius   const
 

This function returns the outer radius of this donut.

void oaDonut::setCenter const oaPoint &    center
 

This function sets the center of this donut to the specified value.

Parameters:
center The center point for the donut

void oaDonut::setHoleRadius oaDist    holeRadius
 

This function sets the inner radius of this donut to the specified value.

Parameters:
holeRadius The inner radius for the donut
Exceptions:
oacDonutRadiiInvalid 

void oaDonut::setRadii oaDist    radius,
oaDist    holeRadius
 

This function sets the inner and outer radii of this donut to the specified values.

Parameters:
radius The outer radius for the donut
holeRadius The inner radius for the donut
Exceptions:
oacDonutRadiiInvalid 

void oaDonut::setRadius oaDist    radius
 

This function sets the outer radius of this donut to the specified value.

Parameters:
radius The outer radius for the donut
Exceptions:
oacDonutRadiiInvalid 


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

Return to top of page