ExtrusionEntity.h
1 /**************************************************************************\
2  *
3  * FILE: ExtrusionEntity.h
4  *
5  * This source file is part of DIME.
6  * Copyright (C) 1998-1999 by Systems In Motion. All rights reserved.
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License, version 2, as
10  * published by the Free Software Foundation.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * General Public License (the accompanying file named COPYING) for more
16  * details.
17  *
18  **************************************************************************
19  *
20  * If you need DIME for a non-GPL project, contact Systems In Motion
21  * to acquire a Professional Edition License:
22  *
23  * Systems In Motion http://www.sim.no/
24  * Prof. Brochs gate 6 sales@sim.no
25  * N-7030 Trondheim Voice: +47 22114160
26  * NORWAY Fax: +47 67172912
27  *
28 \**************************************************************************/
29 
30 #ifndef DIME_EXTRUSIONENTITY_H
31 #define DIME_EXTRUSIONENTITY_H
32 
33 #include <dime/entities/Entity.h>
34 
35 class DIME_DLL_API dimeExtrusionEntity : public dimeEntity
36 {
37 public:
39 
40  virtual bool getRecord(const int groupcode,
41  dimeParam &param,
42  const int index = 0) const;
43 
44  void setExtrusionDir(const dimeVec3f &v);
45  const dimeVec3f &getExtrusionDir() const;
46 
47  void setThickness(const dxfdouble val);
48  dxfdouble getThickness() const;
49 
50  virtual int typeId() const;
51  virtual bool isOfType(const int thtypeid) const;
52  virtual int countRecords() const;
53 
54 protected:
55 
56  virtual bool handleRecord(const int groupcode,
57  const dimeParam &param,
58  dimeMemHandler * const memhandler);
59 
60  void copyExtrusionData(const dimeExtrusionEntity * const entity);
61  bool writeExtrusionData(dimeOutput * const out);
62 
63 protected: // should be private :-(
64  dimeVec3f extrusionDir;
65  dxfdouble thickness;
66 
67 }; // class dimeExtrusionEntity
68 
69 inline void
71 {
72  this->extrusionDir = v;
73 }
74 
75 inline const dimeVec3f &
77 {
78  return this->extrusionDir;
79 }
80 
81 inline void
83 {
84  this->thickness = val;
85 }
86 
87 inline dxfdouble
89 {
90  return this->thickness;
91 }
92 
93 #endif // ! DIME_EXTRUSIONENTITY_H
94 
const dimeVec3f & getExtrusionDir() const
Definition: ExtrusionEntity.h:76
The dimeMemHandler class is a special-purpose memory manager.
Definition: MemHandler.h:35
virtual int typeId() const =0
dxfdouble getThickness() const
Definition: ExtrusionEntity.h:88
virtual bool isOfType(const int thetypeid) const
Definition: Entity.cpp:592
virtual bool getRecord(const int groupcode, dimeParam &param, const int index=0) const
Definition: Entity.cpp:709
The dimeEntity class is the superclass of all entity classes.
Definition: Entity.h:57
void setThickness(const dxfdouble val)
Definition: ExtrusionEntity.h:82
The dimeVec3f class is for containing and operating on a 3D vector / coordinate.
Definition: Linear.h:56
The dimeParam class is a union of the different parameter types.
Definition: Basic.h:97
The dimeExtrusionEntity class is the superclass of all entity classes with extrusion data...
Definition: ExtrusionEntity.h:35
void setExtrusionDir(const dimeVec3f &v)
Definition: ExtrusionEntity.h:70
virtual int countRecords() const
Definition: Entity.cpp:520
virtual bool handleRecord(const int groupcode, const dimeParam &param, dimeMemHandler *const memhandler)
Definition: Entity.cpp:653
The dimeOutput class handles writing of DXF and DXB files.
Definition: Output.h:38

Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.