ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
dl_extrusion.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
3 **
4 ** This file is part of the dxflib project.
5 **
6 ** This file is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
10 **
11 ** Licensees holding valid dxflib Professional Edition licenses may use
12 ** this file in accordance with the dxflib Commercial License
13 ** Agreement provided with the Software.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** See http://www.ribbonsoft.com for further details.
19 **
20 ** Contact info@ribbonsoft.com if any conditions of this licensing are
21 ** not clear to you.
22 **
23 **********************************************************************/
24 
25 #ifndef DL_EXTRUSION_H
26 #define DL_EXTRUSION_H
27 
28 #include <math.h>
29 
30 #include "dl_global.h"
31 
38 public:
43  direction = new double[3];
44  setDirection(0.0, 0.0, 1.0);
45  setElevation(0.0);
46  }
47 
51  ~DL_Extrusion() { delete[] direction; }
52 
61  DL_Extrusion(double dx, double dy, double dz, double elevation) {
62  direction = new double[3];
63  setDirection(dx, dy, dz);
64  setElevation(elevation);
65  }
66 
70  void setDirection(double dx, double dy, double dz) {
71  direction[0] = dx;
72  direction[1] = dy;
73  direction[2] = dz;
74  }
75 
79  double* getDirection() const { return direction; }
80 
84  void getDirection(double dir[]) const {
85  dir[0] = direction[0];
86  dir[1] = direction[1];
87  dir[2] = direction[2];
88  }
89 
93  void setElevation(double elevation) { this->elevation = elevation; }
94 
98  double getElevation() const { return elevation; }
99 
104  setDirection(extru.direction[0], extru.direction[1],
105  extru.direction[2]);
106  setElevation(extru.elevation);
107 
108  return *this;
109  }
110 
111 private:
112  double* direction;
113  double elevation;
114 };
115 
116 #endif
void getDirection(double dir[]) const
Definition: dl_extrusion.h:84
void setDirection(double dx, double dy, double dz)
Definition: dl_extrusion.h:70
void setElevation(double elevation)
Definition: dl_extrusion.h:93
double getElevation() const
Definition: dl_extrusion.h:98
double * getDirection() const
Definition: dl_extrusion.h:79
DL_Extrusion operator=(const DL_Extrusion &extru)
Definition: dl_extrusion.h:103
DL_Extrusion(double dx, double dy, double dz, double elevation)
Definition: dl_extrusion.h:61
#define DXFLIB_EXPORT
Definition: dl_global.h:12