QCAD
Open Source 2D CAD
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
[email protected]
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 "
dl_global.h
"
29
30
#include <math.h>
31
32
38
class
DXFLIB_EXPORT
DL_Extrusion
{
39
40
public
:
41
45
DL_Extrusion
() {
46
direction =
new
double
[3];
47
setDirection(0.0, 0.0, 1.0);
48
setElevation(0.0);
49
}
50
51
55
~
DL_Extrusion
() {
56
delete
[] direction ;
57
}
58
59
68
DL_Extrusion
(
double
dx,
double
dy,
double
dz,
double
elevation) {
69
direction =
new
double
[3];
70
setDirection(dx, dy, dz);
71
setElevation(elevation);
72
}
73
74
75
79
void
setDirection(
double
dx,
double
dy,
double
dz) {
80
direction[0]=dx;
81
direction[1]=dy;
82
direction[2]=dz;
83
}
84
85
86
90
double
* getDirection()
const
{
91
return
direction;
92
}
93
94
95
99
void
getDirection(
double
dir[])
const
{
100
dir[0]=direction[0];
101
dir[1]=direction[1];
102
dir[2]=direction[2];
103
}
104
105
106
110
void
setElevation(
double
elevation) {
111
this->elevation = elevation;
112
}
113
114
115
119
double
getElevation()
const
{
120
return
elevation;
121
}
122
123
124
128
DL_Extrusion
operator = (
const
DL_Extrusion
& extru) {
129
setDirection(extru.
direction
[0], extru.
direction
[1], extru.
direction
[2]);
130
setElevation(extru.
elevation
);
131
132
return
*
this
;
133
}
134
135
136
137
private
:
138
double
*direction;
139
double
elevation;
140
};
141
142
#endif
143
dl_global.h
DL_Extrusion::elevation
double elevation
Definition:
dl_extrusion.h:161
DL_Extrusion::direction
double * direction
Definition:
dl_extrusion.h:160
DXFLIB_EXPORT
#define DXFLIB_EXPORT
Definition:
dl_global.h:12
DL_Extrusion
Extrusion direction.
Definition:
dl_extrusion.h:38
src
3rdparty
dxflib
src
dl_extrusion.h
Generated on Thu Apr 15 2021 10:10:17 for QCAD by
1.8.18