ExtrusionEntity.h

00001 /**************************************************************************\
00002  * 
00003  *  FILE: ExtrusionEntity.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_EXTRUSIONENTITY_H
00031 #define DIME_EXTRUSIONENTITY_H
00032 
00033 #include <dime/entities/Entity.h>
00034 
00035 class DIME_DLL_API dimeExtrusionEntity : public dimeEntity
00036 {
00037 public:
00038   dimeExtrusionEntity();
00039 
00040   virtual bool getRecord(const int groupcode,
00041                          dimeParam &param,
00042                          const int index = 0) const;
00043 
00044   void setExtrusionDir(const dimeVec3f &v);
00045   const dimeVec3f &getExtrusionDir() const;
00046 
00047   void setThickness(const dxfdouble val);
00048   dxfdouble getThickness() const;
00049     
00050   virtual int typeId() const;
00051   virtual bool isOfType(const int thtypeid) const;
00052   virtual int countRecords() const;
00053 
00054 protected:
00055 
00056   virtual bool handleRecord(const int groupcode,
00057                             const dimeParam &param,
00058                             dimeMemHandler * const memhandler);  
00059 
00060   void copyExtrusionData(const dimeExtrusionEntity * const entity);
00061   bool writeExtrusionData(dimeOutput * const out);
00062   
00063 protected: // should be private :-(
00064   dimeVec3f extrusionDir;
00065   dxfdouble thickness;
00066 
00067 }; // class dimeExtrusionEntity
00068 
00069 inline void 
00070 dimeExtrusionEntity::setExtrusionDir(const dimeVec3f &v)
00071 {
00072   this->extrusionDir = v;
00073 }
00074 
00075 inline const dimeVec3f &
00076 dimeExtrusionEntity::getExtrusionDir() const
00077 {
00078   return this->extrusionDir;
00079 }
00080 
00081 inline void 
00082 dimeExtrusionEntity::setThickness(const dxfdouble val)
00083 {
00084   this->thickness = val;
00085 }
00086 
00087 inline dxfdouble 
00088 dimeExtrusionEntity::getThickness() const
00089 {
00090   return this->thickness;
00091 }
00092 
00093 #endif // ! DIME_EXTRUSIONENTITY_H
00094 

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