Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

Circle.h

00001 /**************************************************************************\
00002  * 
00003  *  FILE: Circle.h
00004  *
00005  *  This source file is part of DIME.
00006  *  Copyright (C) 1998-1999 by Systems In Motion.  All rights reserved.
00007  *
00008  *  This library is free software; you can redistribute it and/or modify it
00009  *  under the terms of the GNU General Public License, version 2, as
00010  *  published by the Free Software Foundation.
00011  *
00012  *  This library is distributed in the hope that it will be useful, but
00013  *  WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  General Public License (the accompanying file named COPYING) for more
00016  *  details.
00017  *
00018  **************************************************************************
00019  *
00020  *  If you need DIME for a non-GPL project, contact Systems In Motion
00021  *  to acquire a Professional Edition License:
00022  *
00023  *  Systems In Motion                                   http://www.sim.no/
00024  *  Prof. Brochs gate 6                                       sales@sim.no
00025  *  N-7030 Trondheim                                   Voice: +47 22114160
00026  *  NORWAY                                               Fax: +47 67172912
00027  *
00028 \**************************************************************************/
00029 
00030 #ifndef DIME_CIRCLE_H
00031 #define DIME_CIRCLE_H
00032 
00033 #include <dime/Basic.h>
00034 #include <dime/entities/ExtrusionEntity.h>
00035 #include <dime/util/Linear.h>
00036 
00037 class dimeModel;
00038 class dimeMemHandler;
00039 
00040 class DIME_DLL_API dimeCircle : public dimeExtrusionEntity
00041 {
00042 public:
00043   dimeCircle();
00044 
00045   const dimeVec3f &getCenter() const;
00046   void setCenter(const dimeVec3f &c);
00047 
00048   void setRadius(const dxfdouble val);
00049   dxfdouble getRadius() const;
00050 
00051   virtual dimeEntity *copy(dimeModel * const model) const;
00052   virtual bool getRecord(const int groupcode,
00053                          dimeParam &param,
00054                          const int index = 0) const;
00055   virtual const char *getEntityName() const;
00056   virtual void print() const;
00057   virtual bool write(dimeOutput * const out);
00058   virtual int typeId() const;
00059   virtual int countRecords() const;
00060 
00061   virtual GeometryType extractGeometry(dimeArray <dimeVec3f> &verts,
00062                                        dimeArray <int> &indices,
00063                                        dimeVec3f &extrusionDir,
00064                                        dxfdouble &thickness);
00065 
00066 protected:  
00067   virtual bool handleRecord(const int groupcode,
00068                             const dimeParam &param,
00069                             dimeMemHandler * const memhandler);  
00070 private:
00071   dimeVec3f center;
00072   dxfdouble radius;
00073 
00074 }; // class dimeCircle
00075 
00076 inline const dimeVec3f &
00077 dimeCircle::getCenter() const
00078 {
00079   return this->center;
00080 }
00081 
00082 inline void 
00083 dimeCircle::setCenter(const dimeVec3f &c)
00084 {
00085   this->center = c;
00086 }
00087 
00088 inline void 
00089 dimeCircle::setRadius(const dxfdouble val)
00090 {
00091   this->radius = val;
00092 }
00093 
00094 inline dxfdouble 
00095 dimeCircle::getRadius() const
00096 {
00097   return this->radius;
00098 }
00099 
00100 #endif // ! DIME_CIRCLE_H
00101 

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