00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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_