Circle.h
1 /**************************************************************************\
2  *
3  * FILE: Circle.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_CIRCLE_H
31 #define DIME_CIRCLE_H
32 
33 #include <dime/Basic.h>
34 #include <dime/entities/ExtrusionEntity.h>
35 #include <dime/util/Linear.h>
36 
37 class dimeModel;
38 class dimeMemHandler;
39 
40 class DIME_DLL_API dimeCircle : public dimeExtrusionEntity
41 {
42 public:
43  dimeCircle();
44 
45  const dimeVec3f &getCenter() const;
46  void setCenter(const dimeVec3f &c);
47 
48  void setRadius(const dxfdouble val);
49  dxfdouble getRadius() const;
50 
51  virtual dimeEntity *copy(dimeModel * const model) const;
52  virtual bool getRecord(const int groupcode,
53  dimeParam &param,
54  const int index = 0) const;
55  virtual const char *getEntityName() const;
56  virtual void print() const;
57  virtual bool write(dimeOutput * const out);
58  virtual int typeId() const;
59  virtual int countRecords() const;
60 
61  virtual GeometryType extractGeometry(dimeArray <dimeVec3f> &verts,
62  dimeArray <int> &indices,
63  dimeVec3f &extrusionDir,
64  dxfdouble &thickness);
65 
66 protected:
67  virtual bool handleRecord(const int groupcode,
68  const dimeParam &param,
69  dimeMemHandler * const memhandler);
70 private:
71  dimeVec3f center;
72  dxfdouble radius;
73 
74 }; // class dimeCircle
75 
76 inline const dimeVec3f &
77 dimeCircle::getCenter() const
78 {
79  return this->center;
80 }
81 
82 inline void
83 dimeCircle::setCenter(const dimeVec3f &c)
84 {
85  this->center = c;
86 }
87 
88 inline void
89 dimeCircle::setRadius(const dxfdouble val)
90 {
91  this->radius = val;
92 }
93 
94 inline dxfdouble
95 dimeCircle::getRadius() const
96 {
97  return this->radius;
98 }
99 
100 #endif // ! DIME_CIRCLE_H
101 

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