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

convert.h

00001 /**************************************************************************\
00002  *
00003  *  This source file is part of DIME.
00004  *  Copyright (C) 1998-2001 by Systems In Motion.  All rights reserved.
00005  *
00006  *  This library is free software; you can redistribute it and/or modify it
00007  *  under the terms of the GNU General Public License, version 2, as
00008  *  published by the Free Software Foundation.
00009  *
00010  *  This library is distributed in the hope that it will be useful, but
00011  *  WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  *  General Public License (the accompanying file named COPYING) for more
00014  *  details.
00015  *
00016  **************************************************************************
00017  *
00018  *  If you need DIME for a non-GPL project, contact Systems In Motion
00019  *  to acquire a Professional Edition License:
00020  *
00021  *  Systems In Motion                                   http://www.sim.no/
00022  *  Prof. Brochs gate 6                                       sales@sim.no
00023  *  N-7030 Trondheim                                   Voice: +47 22114160
00024  *  NORWAY                                               Fax: +47 22207097
00025  *
00026 \**************************************************************************/
00027 
00028 #ifndef _DXF2VRML_CONVERT_H_
00029 #define _DXF2VRML_CONVERT_H_
00030 
00031 #include <stdio.h>
00032 #include <dime/Basic.h>
00033 
00034 class dimeModel;
00035 class dxfLayerData;
00036 class dimeState;
00037 class dimeEntity;
00038 
00039 class DIME_DLL_API dxfConverter
00040 {
00041 public:
00042   dxfConverter();
00043   ~dxfConverter();
00044   
00045   void setMaxerr(const dxfdouble maxerr) {
00046     this->maxerr = maxerr;
00047   }
00048   void findHeaderVariables(dimeModel &model);
00049   bool doConvert(dimeModel &model);
00050   bool writeVrml(FILE *out, const bool vrml1 = false,
00051                  const bool only2d = false);
00052 
00053   void setNumSub(const int num) {
00054     this->numsub = num;
00055   }
00056   int getNumSub() const {
00057     return numsub;
00058   }
00059   dxfdouble getMaxerr() const {
00060     return this->maxerr;
00061   }
00062 
00063   void setFillmode(const bool fill) {
00064     this->fillmode = fill;
00065   }
00066   bool getFillmode() const {
00067     return this->fillmode;
00068   }
00069 
00070   bool getLayercol() const {
00071     return this->layercol;
00072   }
00073   
00074   void setLayercol(const bool v) {
00075     this->layercol = v;
00076   }
00077 
00078   dxfLayerData *getLayerData(const int colidx);
00079   dxfLayerData *getLayerData(const dimeEntity *entity);
00080   dxfLayerData ** getLayerData();
00081   int getColorIndex(const dimeEntity *entity);
00082   int getCurrentInsertColorIndex() const {
00083     return currentInsertColorIndex;
00084   }
00085 
00086 private:
00087   friend class dime2Profit;
00088   friend class dime2So;
00089 
00090   dxfLayerData *layerData[255];
00091   int dummy[4];
00092   dxfdouble maxerr;
00093   int currentInsertColorIndex;
00094   dimeEntity *currentPolyline;
00095   int numsub;
00096   bool fillmode;
00097   bool layercol;
00098   
00099   bool private_callback(const dimeState * const state, 
00100                         dimeEntity *entity);
00101   static bool dime_callback(const dimeState * const state, 
00102                             dimeEntity *entity, void *);
00103 
00104 };
00105 
00106 #endif // _DXF2VRML_CONVERT_H_

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