oaTransform.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaTransform.h
00004 //
00005 // This file contains the definition for the oaTransform class. This class
00006 // implements a 2D transformation including orientation and translation.
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(oaTransform_P)
00027 #define oaTransform_P
00028 
00029 
00030 
00031 // *****************************************************************************
00032 // Nested includes
00033 // *****************************************************************************
00034 #include "oaOrient.h"
00035 #include "oaPoint.h"
00036 
00037 
00038 
00039 // *****************************************************************************
00040 // Declare and define types in the OpenAccess namespace.
00041 // *****************************************************************************
00042 BEGIN_OA_NAMESPACE
00043 
00044 
00045 
00046 // *****************************************************************************
00047 // oaTransform
00048 // *****************************************************************************
00049 class OA_BASE_DLL_API oaTransform {
00050 public:
00051                             oaTransform();
00052                             oaTransform(const oaPoint   &offsetIn,
00053                                         oaOrient        orientIn = oacR0);
00054                             oaTransform(oaOffset    xOffsetIn,
00055                                         oaOffset    yOffsetIn,
00056                                         oaOrient    orientIn = oacR0);
00057                             oaTransform(oaOrient orientIn);
00058                             oaTransform(const oaTransform   &xform1,
00059                                         const oaTransform   &xform2);
00060 
00061     oaPoint                 &offset();
00062     oaOffset                &xOffset();
00063     oaOffset                &yOffset();
00064     oaOrient                &orient();
00065     const oaPoint           &offset() const;
00066     oaOffset                xOffset() const;
00067     oaOffset                yOffset() const;
00068     oaOrient                orient() const;
00069 
00070     void                    set(const oaPoint   &offsetIn,
00071                                 oaOrient        orientIn = oacR0);
00072     void                    set(oaOffset    xOffsetIn,
00073                                 oaOffset    yOffsetIn,
00074                                 oaOrient    orientIn = oacR0);
00075     void                    set(oaOrient orientIn);
00076     void                    set(const oaTransform   &xform1,
00077                                 const oaTransform   &xform2);
00078 
00079     void                    init();
00080 
00081     void                    invert(oaTransform &result) const;
00082     void                    invert();
00083 
00084     void                    concat(const oaTransform    &xform,
00085                                    oaTransform          &result) const;
00086     void                    concat(const oaTransform &xform);
00087 
00088     oaBoolean               isIdentity() const;
00089 
00090     oaBoolean               operator==(const oaTransform &xform) const;
00091     oaBoolean               operator!=(const oaTransform &xform) const;
00092 
00093 private:
00094     oaPoint                 offsetVal;
00095     oaOrient                orientVal;
00096 };
00097 
00098 
00099 
00100 END_OA_NAMESPACE
00101 
00102 #endif

Return to top of page