1 /****************************************************************************
2 ** $Id: dl_extrusion.h 273 2005-02-28 18:14:39Z andrew $
4 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6 ** This file is part of the dxflib project.
8 ** This file may be distributed and/or modified under the terms of the
9 ** GNU General Public License version 2 as published by the Free Software
10 ** Foundation and appearing in the file LICENSE.GPL included in the
11 ** packaging of this file.
13 ** Licensees holding valid dxflib Professional Edition licenses may use
14 ** this file in accordance with the dxflib Commercial License
15 ** Agreement provided with the Software.
17 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 ** See http://www.ribbonsoft.com for further details.
22 ** Contact info@ribbonsoft.com if any conditions of this licensing are
25 **********************************************************************/
27 #ifndef DL_EXTRUSION_H
28 #define DL_EXTRUSION_H
34 * Storing and passing around attributes. Attributes
35 * are the layer name, color, width and line type.
37 * @author Andrew Mustun
44 * Default constructor.
47 direction = new double[3];
48 setDirection(0.0, 0.0, 1.0);
62 * Constructor for DXF extrusion.
64 * @param direction Vector of axis along which the entity shall be extruded
65 * this is also the Z axis of the Entity coordinate system
66 * @param elevation Distance of the entities XY plane from the origin of the
67 * world coordinate system
69 DL_Extrusion(double dx, double dy, double dz, double elevation) {
70 direction = new double[3];
71 setDirection(dx, dy, dz);
72 setElevation(elevation);
78 * Sets the direction vector.
80 void setDirection(double dx, double dy, double dz) {
89 * @return direction vector.
91 double* getDirection() const {
98 * @return direction vector.
100 void getDirection(double dir[]) const {
109 * Sets the elevation.
111 void setElevation(double elevation) {
112 this->elevation = elevation;
120 double getElevation() const {
127 * Copies extrusion (deep copies) from another extrusion object.
129 DL_Extrusion operator = (const DL_Extrusion& extru) {
130 setDirection(extru.direction[0], extru.direction[1], extru.direction[2]);
131 setElevation(extru.elevation);