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

dl_entities.h

00001 /****************************************************************************
00002 ** $Id: dl_entities.h 2398 2005-06-06 18:12:14Z andrew $
00003 **
00004 ** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
00005 **
00006 ** This file is part of the dxflib project.
00007 **
00008 ** This file may be distributed and/or modified under the terms of the
00009 ** GNU General Public License version 2 as published by the Free Software
00010 ** Foundation and appearing in the file LICENSE.GPL included in the
00011 ** packaging of this file.
00012 **
00013 ** Licensees holding valid dxflib Professional Edition licenses may use 
00014 ** this file in accordance with the dxflib Commercial License
00015 ** Agreement provided with the Software.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019 **
00020 ** See http://www.ribbonsoft.com for further details.
00021 **
00022 ** Contact [email protected] if any conditions of this licensing are
00023 ** not clear to you.
00024 **
00025 **********************************************************************/
00026 
00027 #ifndef DL_ENTITIES_H
00028 #define DL_ENTITIES_H
00029 
00030 
00031 #include <string>
00032 using std::string;
00033 
00039 struct DL_LayerData {
00044     DL_LayerData(const string& lName,
00045                  int lFlags) {
00046         name = lName;
00047         flags = lFlags;
00048     }
00049 
00051     string name;
00053     int flags;
00054 };
00055 
00056 
00057 
00063 struct DL_BlockData {
00068     DL_BlockData(const string& bName,
00069                  int bFlags,
00070                  double bbpx, double bbpy, double bbpz) {
00071         name = bName;
00072         flags = bFlags;
00073         bpx = bbpx;
00074         bpy = bbpy;
00075         bpz = bbpz;
00076     }
00077 
00079     string name;
00081     int flags;
00083     double bpx;
00085     double bpy;
00087     double bpz;
00088 };
00089 
00090 
00091 
00097 struct DL_LineTypeData {
00102     DL_LineTypeData(const string& lName,
00103                     int lFlags) {
00104         name = lName;
00105         flags = lFlags;
00106     }
00107 
00109     string name;
00111     int flags;
00112 };
00113 
00114 
00115 
00121 struct DL_PointData {
00126     DL_PointData(double px=0.0, double py=0.0, double pz=0.0) {
00127         x = px;
00128         y = py;
00129         z = pz;
00130     }
00131 
00133     double x;
00135     double y;
00137     double z;
00138 };
00139 
00140 
00141 
00147 struct DL_LineData {
00152     DL_LineData(double lx1, double ly1, double lz1,
00153                 double lx2, double ly2, double lz2) {
00154         x1 = lx1;
00155         y1 = ly1;
00156         z1 = lz1;
00157 
00158         x2 = lx2;
00159         y2 = ly2;
00160         z2 = lz2;
00161     }
00162 
00164     double x1;
00166     double y1;
00168     double z1;
00169 
00171     double x2;
00173     double y2;
00175     double z2;
00176 };
00177 
00178 
00179 
00185 struct DL_ArcData {
00190     DL_ArcData(double acx, double acy, double acz,
00191                double aRadius,
00192                double aAngle1, double aAngle2) {
00193 
00194         cx = acx;
00195         cy = acy;
00196         cz = acz;
00197         radius = aRadius;
00198         angle1 = aAngle1;
00199         angle2 = aAngle2;
00200     }
00201 
00203     double cx;
00205     double cy;
00207     double cz;
00208 
00210     double radius;
00212     double angle1;
00214     double angle2;
00215 };
00216 
00217 
00218 
00224 struct DL_CircleData {
00229     DL_CircleData(double acx, double acy, double acz,
00230                   double aRadius) {
00231 
00232         cx = acx;
00233         cy = acy;
00234         cz = acz;
00235         radius = aRadius;
00236     }
00237 
00239     double cx;
00241     double cy;
00243     double cz;
00244 
00246     double radius;
00247 };
00248 
00249 
00250 
00256 struct DL_PolylineData {
00261     DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags) {
00262         number = pNumber;
00263         m = pMVerteces;
00264         n = pNVerteces;
00265         flags = pFlags;
00266     }
00267 
00269     unsigned int number;
00270 
00272     unsigned int m;
00273 
00275     unsigned int n;
00276 
00278     int flags;
00279 };
00280 
00281 
00282 
00288 struct DL_VertexData {
00293     DL_VertexData(double px=0.0, double py=0.0, double pz=0.0,
00294                   double pBulge=0.0) {
00295         x = px;
00296         y = py;
00297         z = pz;
00298         bulge = pBulge;
00299     }
00300 
00302     double x;
00304     double y;
00306     double z;
00309     double bulge;
00310 };
00311 
00312 
00318 struct DL_TraceData {
00319     double x[4];
00320     double y[4];
00321     double z[4];
00322 };
00323 
00324 
00330 typedef DL_TraceData DL_SolidData;
00331 
00332 
00338 struct DL_SplineData {
00343     DL_SplineData(int pDegree, int pNKnots, int pNControl, int pFlags) {
00344                 degree = pDegree;
00345                 nKnots = pNKnots;
00346                 nControl = pNControl;
00347         flags = pFlags;
00348     }
00349 
00351     unsigned int degree;
00352 
00354     unsigned int nKnots;
00355 
00357     unsigned int nControl;
00358 
00360     int flags;
00361 };
00362 
00363 
00364 
00370 struct DL_KnotData {
00371     DL_KnotData() {}
00376     DL_KnotData(double pk) {
00377         k = pk;
00378     }
00379 
00381     double k;
00382 };
00383 
00384 
00385 
00391 struct DL_ControlPointData {
00396     DL_ControlPointData(double px, double py, double pz) {
00397         x = px;
00398         y = py;
00399         z = pz;
00400     }
00401 
00403     double x;
00405     double y;
00407     double z;
00408 };
00409 
00410 
00416 struct DL_EllipseData {
00421     DL_EllipseData(double ecx, double ecy, double ecz,
00422                    double emx, double emy, double emz,
00423                    double eRatio,
00424                    double eAngle1, double eAngle2) {
00425 
00426         cx = ecx;
00427         cy = ecy;
00428         cz = ecz;
00429         mx = emx;
00430         my = emy;
00431         mz = emz;
00432         ratio = eRatio;
00433         angle1 = eAngle1;
00434         angle2 = eAngle2;
00435     }
00436 
00438     double cx;
00440     double cy;
00442     double cz;
00443 
00445     double mx;
00447     double my;
00449     double mz;
00450 
00452     double ratio;
00454     double angle1;
00456     double angle2;
00457 };
00458 
00459 
00460 
00466 struct DL_InsertData {
00471     DL_InsertData(const string& iName,
00472                   double iipx, double iipy, double iipz,
00473                   double isx, double isy, double isz,
00474                   double iAngle,
00475                   int iCols, int iRows,
00476                   double iColSp, double iRowSp) {
00477         name = iName;
00478         ipx = iipx;
00479         ipy = iipy;
00480         ipz = iipz;
00481         sx = isx;
00482         sy = isy;
00483         sz = isz;
00484         angle = iAngle;
00485         cols = iCols;
00486         rows = iRows;
00487         colSp = iColSp;
00488         rowSp = iRowSp;
00489     }
00490 
00492     string name;
00494     double ipx;
00496     double ipy;
00498     double ipz;
00500     double sx;
00502     double sy;
00504     double sz;
00506     double angle;
00508     int cols;
00510     int rows;
00512     double colSp;
00514     double rowSp;
00515 };
00516 
00517 
00518 
00524 struct DL_MTextData {
00529     DL_MTextData(double tipx, double tipy, double tipz,
00530                  double tHeight, double tWidth,
00531                  int tAttachmentPoint,
00532                  int tDrawingDirection,
00533                  int tLineSpacingStyle,
00534                  double tLineSpacingFactor,
00535                  const string& tText,
00536                  const string& tStyle,
00537                  double tAngle) {
00538         ipx = tipx;
00539         ipy = tipy;
00540         ipz = tipz;
00541 
00542         height = tHeight;
00543         width = tWidth;
00544         attachmentPoint = tAttachmentPoint;
00545         drawingDirection = tDrawingDirection;
00546         lineSpacingStyle = tLineSpacingStyle;
00547         lineSpacingFactor = tLineSpacingFactor;
00548         text = tText;
00549         style = tStyle;
00550         angle = tAngle;
00551     }
00552 
00554     double ipx;
00556     double ipy;
00558     double ipz;
00560     double height;
00562     double width;
00570     int attachmentPoint;
00576     int drawingDirection;
00582     int lineSpacingStyle;
00586     double lineSpacingFactor;
00588     string text;
00590     string style;
00592     double angle;
00593 };
00594 
00595 
00596 
00602 struct DL_TextData {
00607     DL_TextData(double tipx, double tipy, double tipz,
00608                 double tapx, double tapy, double tapz,
00609                 double tHeight, double tXScaleFactor,
00610                 int tTextGenerationFlags,
00611                 int tHJustification,
00612                 int tVJustification,
00613                 const string& tText,
00614                 const string& tStyle,
00615                 double tAngle) {
00616         ipx = tipx;
00617         ipy = tipy;
00618         ipz = tipz;
00619 
00620         apx = tapx;
00621         apy = tapy;
00622         apz = tapz;
00623 
00624         height = tHeight;
00625         xScaleFactor = tXScaleFactor;
00626         textGenerationFlags = tTextGenerationFlags;
00627         hJustification = tHJustification;
00628         vJustification = tVJustification;
00629         text = tText;
00630         style = tStyle;
00631         angle = tAngle;
00632     }
00633 
00635     double ipx;
00637     double ipy;
00639     double ipz;
00640 
00642     double apx;
00644     double apy;
00646     double apz;
00647 
00649     double height;
00651     double xScaleFactor;
00653     int textGenerationFlags;
00661     int hJustification;
00667     int vJustification;
00669     string text;
00671     string style;
00673     double angle;
00674 };
00675 
00676 
00677 
00683 struct DL_DimensionData {
00688     DL_DimensionData(double ddpx, double ddpy, double ddpz,
00689                      double dmpx, double dmpy, double dmpz,
00690                      int dType,
00691                      int dAttachmentPoint,
00692                      int dLineSpacingStyle,
00693                      double dLineSpacingFactor,
00694                      const string& dText,
00695                      const string& dStyle,
00696                      double dAngle) {
00697 
00698         dpx = ddpx;
00699         dpy = ddpy;
00700         dpz = ddpz;
00701 
00702         mpx = dmpx;
00703         mpy = dmpy;
00704         mpz = dmpz;
00705 
00706         type = dType;
00707 
00708         attachmentPoint = dAttachmentPoint;
00709         lineSpacingStyle = dLineSpacingStyle;
00710         lineSpacingFactor = dLineSpacingFactor;
00711         text = dText;
00712         style = dStyle;
00713         angle = dAngle;
00714     }
00715 
00717     double dpx;
00719     double dpy;
00721     double dpz;
00723     double mpx;
00725     double mpy;
00727     double mpz;
00747     int type;
00755     int attachmentPoint;
00761     int lineSpacingStyle;
00765     double lineSpacingFactor;
00773     string text;
00775     string style;
00780     double angle;
00781 };
00782 
00783 
00784 
00790 struct DL_DimAlignedData {
00795     DL_DimAlignedData(double depx1, double depy1, double depz1,
00796                       double depx2, double depy2, double depz2) {
00797 
00798         epx1 = depx1;
00799         epy1 = depy1;
00800         epz1 = depz1;
00801 
00802         epx2 = depx2;
00803         epy2 = depy2;
00804         epz2 = depz2;
00805     }
00806 
00808     double epx1;
00810     double epy1;
00812     double epz1;
00813 
00815     double epx2;
00817     double epy2;
00819     double epz2;
00820 };
00821 
00822 
00823 
00829 struct DL_DimLinearData {
00834     DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1,
00835                      double ddpx2, double ddpy2, double ddpz2,
00836                      double dAngle, double dOblique) {
00837 
00838         dpx1 = ddpx1;
00839         dpy1 = ddpy1;
00840         dpz1 = ddpz1;
00841 
00842         dpx2 = ddpx2;
00843         dpy2 = ddpy2;
00844         dpz2 = ddpz2;
00845 
00846         angle = dAngle;
00847         oblique = dOblique;
00848     }
00849 
00851     double dpx1;
00853     double dpy1;
00855     double dpz1;
00856 
00858     double dpx2;
00860     double dpy2;
00862     double dpz2;
00863 
00865     double angle;
00867     double oblique;
00868 };
00869 
00870 
00871 
00877 struct DL_DimRadialData {
00882     DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) {
00883         dpx = ddpx;
00884         dpy = ddpy;
00885         dpz = ddpz;
00886 
00887         leader = dleader;
00888     }
00889 
00891     double dpx;
00893     double dpy;
00895     double dpz;
00896 
00898     double leader;
00899 };
00900 
00901 
00902 
00908 struct DL_DimDiametricData {
00913     DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) {
00914         dpx = ddpx;
00915         dpy = ddpy;
00916         dpz = ddpz;
00917 
00918         leader = dleader;
00919     }
00920 
00922     double dpx;
00924     double dpy;
00926     double dpz;
00927 
00929     double leader;
00930 };
00931 
00932 
00933 
00939 struct DL_DimAngularData {
00944     DL_DimAngularData(double ddpx1, double ddpy1, double ddpz1,
00945                       double ddpx2, double ddpy2, double ddpz2,
00946                       double ddpx3, double ddpy3, double ddpz3,
00947                       double ddpx4, double ddpy4, double ddpz4) {
00948 
00949         dpx1 = ddpx1;
00950         dpy1 = ddpy1;
00951         dpz1 = ddpz1;
00952 
00953         dpx2 = ddpx2;
00954         dpy2 = ddpy2;
00955         dpz2 = ddpz2;
00956 
00957         dpx3 = ddpx3;
00958         dpy3 = ddpy3;
00959         dpz3 = ddpz3;
00960 
00961         dpx4 = ddpx4;
00962         dpy4 = ddpy4;
00963         dpz4 = ddpz4;
00964     }
00965 
00967     double dpx1;
00969     double dpy1;
00971     double dpz1;
00972 
00974     double dpx2;
00976     double dpy2;
00978     double dpz2;
00979 
00981     double dpx3;
00983     double dpy3;
00985     double dpz3;
00986 
00988     double dpx4;
00990     double dpy4;
00992     double dpz4;
00993 };
00994 
00995 
01001 struct DL_DimAngular3PData {
01006     DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1,
01007                         double ddpx2, double ddpy2, double ddpz2,
01008                         double ddpx3, double ddpy3, double ddpz3) {
01009 
01010         dpx1 = ddpx1;
01011         dpy1 = ddpy1;
01012         dpz1 = ddpz1;
01013 
01014         dpx2 = ddpx2;
01015         dpy2 = ddpy2;
01016         dpz2 = ddpz2;
01017 
01018         dpx3 = ddpx3;
01019         dpy3 = ddpy3;
01020         dpz3 = ddpz3;
01021     }
01022 
01024     double dpx1;
01026     double dpy1;
01028     double dpz1;
01029 
01031     double dpx2;
01033     double dpy2;
01035     double dpz2;
01036 
01038     double dpx3;
01040     double dpy3;
01042     double dpz3;
01043 };
01044 
01045 
01046 
01052 struct DL_LeaderData {
01057     DL_LeaderData(int lArrowHeadFlag,
01058                   int lLeaderPathType,
01059                   int lLeaderCreationFlag,
01060                   int lHooklineDirectionFlag,
01061                   int lHooklineFlag,
01062                   double lTextAnnotationHeight,
01063                   double lTextAnnotationWidth,
01064                   int lNumber) {
01065 
01066         arrowHeadFlag = lArrowHeadFlag;
01067         leaderPathType = lLeaderPathType;
01068         leaderCreationFlag = lLeaderCreationFlag;
01069         hooklineDirectionFlag = lHooklineDirectionFlag;
01070         hooklineFlag = lHooklineFlag;
01071         textAnnotationHeight = lTextAnnotationHeight;
01072         textAnnotationWidth = lTextAnnotationWidth;
01073         number = lNumber;
01074     }
01075 
01077     int arrowHeadFlag;
01079     int leaderPathType;
01081     int leaderCreationFlag;
01083     int hooklineDirectionFlag;
01085     int hooklineFlag;
01087     double textAnnotationHeight;
01089     double textAnnotationWidth;
01091     int number;
01092 };
01093 
01094 
01095 
01101 struct DL_LeaderVertexData {
01106     DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) {
01107         x = px;
01108         y = py;
01109         z = pz;
01110     }
01111 
01113     double x;
01115     double y;
01117     double z;
01118 };
01119 
01120 
01121 
01125 struct DL_HatchData {
01129     DL_HatchData() {}
01130 
01135     DL_HatchData(int hNumLoops,
01136                  bool hSolid,
01137                  double hScale,
01138                  double hAngle,
01139                  const string& hPattern) {
01140         numLoops = hNumLoops;
01141         solid = hSolid;
01142         scale = hScale;
01143         angle = hAngle;
01144         pattern = hPattern;
01145     }
01146 
01148     int numLoops;
01150     bool solid;
01152     double scale;
01154     double angle;
01156     string pattern;
01157 };
01158 
01159 
01160 
01164 struct DL_HatchLoopData {
01168     DL_HatchLoopData() {}
01173     DL_HatchLoopData(int hNumEdges) {
01174         numEdges = hNumEdges;
01175     }
01176 
01178     int numEdges;
01179 };
01180 
01181 
01182 
01186 struct DL_HatchEdgeData {
01190     DL_HatchEdgeData() {
01191         defined = false;
01192     }
01193 
01198     DL_HatchEdgeData(double lx1, double ly1,
01199                      double lx2, double ly2) {
01200         x1 = lx1;
01201         y1 = ly1;
01202         x2 = lx2;
01203         y2 = ly2;
01204         type = 1;
01205         defined = true;
01206     }
01207 
01212     DL_HatchEdgeData(double acx, double acy,
01213                      double aRadius,
01214                      double aAngle1, double aAngle2,
01215                      bool aCcw) {
01216         cx = acx;
01217         cy = acy;
01218         radius = aRadius;
01219         angle1 = aAngle1;
01220         angle2 = aAngle2;
01221         ccw = aCcw;
01222         type = 2;
01223         defined = true;
01224     }
01225 
01229     int type;
01230 
01234     bool defined;
01235 
01237     double x1;
01239     double y1;
01241     double x2;
01243     double y2;
01245     double cx;
01247     double cy;
01249     double radius;
01251     double angle1;
01253     double angle2;
01255     bool ccw;
01256 };
01257 
01258 
01259 
01265 struct DL_ImageData {
01270     DL_ImageData(const string& iref,
01271                   double iipx, double iipy, double iipz,
01272                                   double iux, double iuy, double iuz,
01273                                   double ivx, double ivy, double ivz,
01274                                   int iwidth, int iheight,
01275                                   int ibrightness, int icontrast, int ifade) {
01276         ref = iref;
01277         ipx = iipx;
01278         ipy = iipy;
01279         ipz = iipz;
01280                 ux = iux;
01281                 uy = iuy;
01282                 uz = iuz;
01283                 vx = ivx;
01284                 vy = ivy;
01285                 vz = ivz;
01286                 width = iwidth;
01287                 height = iheight;
01288                 brightness = ibrightness;
01289                 contrast = icontrast;
01290                 fade = ifade;
01291     }
01292 
01295     string ref;
01297     double ipx;
01299     double ipy;
01301     double ipz;
01303         double ux;
01305         double uy;
01307         double uz;
01309         double vx;
01311         double vy;
01313         double vz;
01315         int width;
01317         int height;
01319         int brightness;
01321         int contrast;
01323         int fade;
01324 };
01325 
01326 
01327 
01333 struct DL_ImageDefData {
01338     DL_ImageDefData(const string& iref,
01339                                  const string& ifile) {
01340         ref = iref;
01341                 file = ifile;
01342     }
01343 
01346     string ref;
01347 
01349         string file;
01350 };
01351 
01352 #endif
01353 
01354 // EOF
01355 

Generated on Sat Jan 6 13:48:19 2007 for dxflib by  doxygen 1.4.4