Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

dl_extrusion.h

00001 /****************************************************************************
00002 ** $Id: dl_extrusion.h 3591 2006-10-18 21:23:25Z andrew $
00003 **
00004 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
00005 **
00006 ** This file is part of the dxflib project.
00007 **
00008 ** This file may be distributed and/or modified under the terms of the
00009 ** GNU General Public License version 2 as published by the Free Software
00010 ** Foundation and appearing in the file LICENSE.GPL included in the
00011 ** packaging of this file.
00012 **
00013 ** Licensees holding valid dxflib Professional Edition licenses may use 
00014 ** this file in accordance with the dxflib Commercial License
00015 ** Agreement provided with the Software.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019 **
00020 ** See http://www.ribbonsoft.com for further details.
00021 **
00022 ** Contact [email protected] if any conditions of this licensing are
00023 ** not clear to you.
00024 **
00025 **********************************************************************/
00026 
00027 #ifndef DL_EXTRUSION_H
00028 #define DL_EXTRUSION_H
00029 
00030 #include <math.h>
00031 
00032 
00039 class DL_Extrusion {
00040 
00041 public:
00042 
00046     DL_Extrusion() {
00047                 direction = new double[3];
00048         setDirection(0.0, 0.0, 1.0);
00049         setElevation(0.0);
00050     }
00051 
00052 
00056         ~DL_Extrusion() {
00057                 delete direction ;
00058     }
00059 
00060 
00069     DL_Extrusion(double dx, double dy, double dz, double elevation) {
00070                 direction = new double[3];
00071                 setDirection(dx, dy, dz);
00072         setElevation(elevation);
00073     }
00074 
00075 
00076 
00080     void setDirection(double dx, double dy, double dz) {
00081                 direction[0]=dx;
00082         direction[1]=dy;
00083         direction[2]=dz;
00084     }
00085 
00086 
00087 
00091     double* getDirection() const {
00092         return direction;
00093     }
00094 
00095 
00096 
00100     void getDirection(double dir[]) const {
00101         dir[0]=direction[0];
00102         dir[1]=direction[1];
00103         dir[2]=direction[2];
00104     }
00105 
00106 
00107 
00111     void setElevation(double elevation) {
00112         this->elevation = elevation;
00113     }
00114 
00115 
00116 
00120     double getElevation() const {
00121         return elevation;
00122     }
00123 
00124 
00125 
00129     DL_Extrusion operator = (const DL_Extrusion& extru) {
00130         setDirection(extru.direction[0], extru.direction[1], extru.direction[2]);
00131         setElevation(extru.elevation);
00132 
00133         return *this;
00134     }
00135 
00136 
00137 
00138 private:
00139         double *direction;
00140         double elevation;
00141 };
00142 
00143 #endif
00144 
00145 // EOF

Generated on Sat Jan 6 13:48:19 2007 for dxflib by  doxygen 1.4.4