oaDonut.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaDonut.h
00004 //
00005 // This file contains the definition for the oaDonut class. This class 
00006 // implements a donut shape.
00007 //
00008 // *****************************************************************************
00009 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00010 // Integration Initiative, this material may not be copied, modified,
00011 // re-published, uploaded, executed, or distributed in any way, in any medium,
00012 // in whole or in part, without prior written permission from Cadence.
00013 //
00014 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00015 //                           All Rights Reserved.
00016 //
00017 //  $Author: icftcm $
00018 //  $Revision: #1 $
00019 //  $Date: 2010/08/09 $
00020 //  $State: Exp $
00021 // *****************************************************************************
00022 // *****************************************************************************
00023 
00024 
00025 
00026 #if !defined(oaDonut_P)
00027 #define oaDonut_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaPolygon.h"
00035 
00036 
00037 
00038 // *****************************************************************************
00039 // Declare and define types in the OpenAccess namespace.
00040 // *****************************************************************************
00041 BEGIN_OA_NAMESPACE
00042 
00043 
00044 
00045 // *****************************************************************************
00046 // oaDonut
00047 // *****************************************************************************
00048 class OA_DESIGN_DLL_API oaDonut : public oaShape {
00049 public:
00050     static oaDonut          *create(oaBlock         *block,
00051                                     oaLayerNum      layerNum,
00052                                     oaPurposeNum    purposeNum,
00053                                     const oaPoint   &center,
00054                                     oaDist          radius,
00055                                     oaDist          holeRadius);
00056 
00057     void                    getHoleBBox(oaBox &bBox) const;
00058     void                    getCenter(oaPoint &point) const;
00059     oaDist                  getRadius() const;
00060     oaDist                  getHoleRadius() const;
00061     void                    getBoundary(oaPointArray    &points,
00062                                         oaUInt4         numSides = 20) const;
00063 
00064     void                    setCenter(const oaPoint &center);
00065     void                    setRadius(oaDist radius);
00066     void                    setHoleRadius(oaDist holeRadius);
00067     void                    setRadii(oaDist radius,
00068                                      oaDist holeRadius);
00069 
00070     oaPolygon               *convertToPolygon(oaUInt4 numSides = 20);
00071 
00072     static void             genBoundary(const oaPoint   &center,
00073                                         oaDist          radius,
00074                                         oaDist          holeRadius,
00075                                         oaUInt4         numSides,
00076                                         oaPointArray    &boundary);
00077 };
00078 
00079 
00080 
00081 // *****************************************************************************
00082 // Design Traits.
00083 // *****************************************************************************
00084 template<>
00085 class oaTraits<oaDonut> {
00086 public:
00087     typedef oaShapeModTypeEnum  modTypeType;
00088     typedef oaShape             parentType;
00089     enum {dtIndex = oacShapeDataType};
00090     enum {dataTypeEnumVal = oacShapeDataType};
00091     enum {domain = oacBlockDomain};
00092     enum {dbType = oacDesignDBType};
00093     enum {isMultiDomain = false};
00094     enum {isConcrete = true};
00095     enum {objectTypeEnumVal = oacDonutType};
00096 };
00097 
00098 
00099 
00100 END_OA_NAMESPACE
00101 
00102 #endif

Return to top of page