| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/dxflib/dl_entities.h
Go to the documentation of this file.

    00001 /****************************************************************************
    00002 ** $Id: dl_entities.h 8171 2009-12-11 12:31:36Z fredbed $
    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 info@ribbonsoft.com 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     DL_TraceData() {
    00320         thickness = 0.0;
    00321         for (int i=0; i<4; i++) {
    00322             x[i] = 0.0;
    00323             y[i] = 0.0;
    00324             z[i] = 0.0;
    00325         }
    00326     }
    00327
    00332     DL_TraceData(double sx1, double sy1, double sz1,
    00333                 double sx2, double sy2, double sz2,
    00334                 double sx3, double sy3, double sz3,
    00335                 double sx4, double sy4, double sz4,
    00336                 double sthickness=0.0) {
    00337
    00338         thickness = sthickness;
    00339
    00340         x[0] = sx1;
    00341         y[0] = sy1;
    00342         z[0] = sz1;
    00343
    00344         x[1] = sx2;
    00345         y[1] = sy2;
    00346         z[1] = sz2;
    00347
    00348         x[2] = sx3;
    00349         y[2] = sy3;
    00350         z[2] = sz3;
    00351
    00352         x[3] = sx4;
    00353         y[3] = sy4;
    00354         z[3] = sz4;
    00355     }
    00356
    00358     double thickness;
    00359
    00361     double x[4];
    00362     double y[4];
    00363     double z[4];
    00364 };
    00365
    00366
    00367
    00368
    00369
    00375 typedef DL_TraceData DL_SolidData;
    00376
    00377
    00381 typedef DL_TraceData DL_3dFaceData;
    00382
    00383
    00389 struct DL_SplineData {
    00394     DL_SplineData(int pDegree, int pNKnots, int pNControl, int pFlags) {
    00395                       degree = pDegree;
    00396                       nKnots = pNKnots;
    00397                       nControl = pNControl;
    00398         flags = pFlags;
    00399     }
    00400
    00402     unsigned int degree;
    00403
    00405     unsigned int nKnots;
    00406
    00408     unsigned int nControl;
    00409
    00411     int flags;
    00412 };
    00413
    00414
    00415
    00421 struct DL_KnotData {
    00422     DL_KnotData() {}
    00427     DL_KnotData(double pk) {
    00428         k = pk;
    00429     }
    00430
    00432     double k;
    00433 };
    00434
    00435
    00436
    00442 struct DL_ControlPointData {
    00447     DL_ControlPointData(double px, double py, double pz) {
    00448         x = px;
    00449         y = py;
    00450         z = pz;
    00451     }
    00452
    00454     double x;
    00456     double y;
    00458     double z;
    00459 };
    00460
    00461
    00467 struct DL_EllipseData {
    00472     DL_EllipseData(double ecx, double ecy, double ecz,
    00473                    double emx, double emy, double emz,
    00474                    double eRatio,
    00475                    double eAngle1, double eAngle2) {
    00476
    00477         cx = ecx;
    00478         cy = ecy;
    00479         cz = ecz;
    00480         mx = emx;
    00481         my = emy;
    00482         mz = emz;
    00483         ratio = eRatio;
    00484         angle1 = eAngle1;
    00485         angle2 = eAngle2;
    00486     }
    00487
    00489     double cx;
    00491     double cy;
    00493     double cz;
    00494
    00496     double mx;
    00498     double my;
    00500     double mz;
    00501
    00503     double ratio;
    00505     double angle1;
    00507     double angle2;
    00508 };
    00509
    00510
    00511
    00517 struct DL_InsertData {
    00522     DL_InsertData(const string& iName,
    00523                   double iipx, double iipy, double iipz,
    00524                   double isx, double isy, double isz,
    00525                   double iAngle,
    00526                   int iCols, int iRows,
    00527                   double iColSp, double iRowSp) {
    00528         name = iName;
    00529         ipx = iipx;
    00530         ipy = iipy;
    00531         ipz = iipz;
    00532         sx = isx;
    00533         sy = isy;
    00534         sz = isz;
    00535         angle = iAngle;
    00536         cols = iCols;
    00537         rows = iRows;
    00538         colSp = iColSp;
    00539         rowSp = iRowSp;
    00540     }
    00541
    00543     string name;
    00545     double ipx;
    00547     double ipy;
    00549     double ipz;
    00551     double sx;
    00553     double sy;
    00555     double sz;
    00557     double angle;
    00559     int cols;
    00561     int rows;
    00563     double colSp;
    00565     double rowSp;
    00566 };
    00567
    00568
    00569
    00575 struct DL_MTextData {
    00580     DL_MTextData(double tipx, double tipy, double tipz,
    00581                  double tHeight, double tWidth,
    00582                  int tAttachmentPoint,
    00583                  int tDrawingDirection,
    00584                  int tLineSpacingStyle,
    00585                  double tLineSpacingFactor,
    00586                  const string& tText,
    00587                  const string& tStyle,
    00588                  double tAngle) {
    00589         ipx = tipx;
    00590         ipy = tipy;
    00591         ipz = tipz;
    00592
    00593         height = tHeight;
    00594         width = tWidth;
    00595         attachmentPoint = tAttachmentPoint;
    00596         drawingDirection = tDrawingDirection;
    00597         lineSpacingStyle = tLineSpacingStyle;
    00598         lineSpacingFactor = tLineSpacingFactor;
    00599         text = tText;
    00600         style = tStyle;
    00601         angle = tAngle;
    00602     }
    00603
    00605     double ipx;
    00607     double ipy;
    00609     double ipz;
    00611     double height;
    00613     double width;
    00621     int attachmentPoint;
    00627     int drawingDirection;
    00633     int lineSpacingStyle;
    00637     double lineSpacingFactor;
    00639     string text;
    00641     string style;
    00643     double angle;
    00644 };
    00645
    00646
    00647
    00653 struct DL_TextData {
    00658     DL_TextData(double tipx, double tipy, double tipz,
    00659                 double tapx, double tapy, double tapz,
    00660                 double tHeight, double tXScaleFactor,
    00661                 int tTextGenerationFlags,
    00662                 int tHJustification,
    00663                 int tVJustification,
    00664                 const string& tText,
    00665                 const string& tStyle,
    00666                 double tAngle) {
    00667         ipx = tipx;
    00668         ipy = tipy;
    00669         ipz = tipz;
    00670
    00671         apx = tapx;
    00672         apy = tapy;
    00673         apz = tapz;
    00674
    00675         height = tHeight;
    00676         xScaleFactor = tXScaleFactor;
    00677         textGenerationFlags = tTextGenerationFlags;
    00678         hJustification = tHJustification;
    00679         vJustification = tVJustification;
    00680         text = tText;
    00681         style = tStyle;
    00682         angle = tAngle;
    00683     }
    00684
    00686     double ipx;
    00688     double ipy;
    00690     double ipz;
    00691
    00693     double apx;
    00695     double apy;
    00697     double apz;
    00698
    00700     double height;
    00702     double xScaleFactor;
    00704     int textGenerationFlags;
    00712     int hJustification;
    00718     int vJustification;
    00720     string text;
    00722     string style;
    00724     double angle;
    00725 };
    00726
    00727
    00728
    00734 struct DL_DimensionData {
    00739     DL_DimensionData(double ddpx, double ddpy, double ddpz,
    00740                      double dmpx, double dmpy, double dmpz,
    00741                      int dType,
    00742                      int dAttachmentPoint,
    00743                      int dLineSpacingStyle,
    00744                      double dLineSpacingFactor,
    00745                      const string& dText,
    00746                      const string& dStyle,
    00747                      double dAngle) {
    00748
    00749         dpx = ddpx;
    00750         dpy = ddpy;
    00751         dpz = ddpz;
    00752
    00753         mpx = dmpx;
    00754         mpy = dmpy;
    00755         mpz = dmpz;
    00756
    00757         type = dType;
    00758
    00759         attachmentPoint = dAttachmentPoint;
    00760         lineSpacingStyle = dLineSpacingStyle;
    00761         lineSpacingFactor = dLineSpacingFactor;
    00762         text = dText;
    00763         style = dStyle;
    00764         angle = dAngle;
    00765     }
    00766
    00768     double dpx;
    00770     double dpy;
    00772     double dpz;
    00774     double mpx;
    00776     double mpy;
    00778     double mpz;
    00798     int type;
    00806     int attachmentPoint;
    00812     int lineSpacingStyle;
    00816     double lineSpacingFactor;
    00824     string text;
    00826     string style;
    00831     double angle;
    00832 };
    00833
    00834
    00835
    00841 struct DL_DimAlignedData {
    00846     DL_DimAlignedData(double depx1, double depy1, double depz1,
    00847                       double depx2, double depy2, double depz2) {
    00848
    00849         epx1 = depx1;
    00850         epy1 = depy1;
    00851         epz1 = depz1;
    00852
    00853         epx2 = depx2;
    00854         epy2 = depy2;
    00855         epz2 = depz2;
    00856     }
    00857
    00859     double epx1;
    00861     double epy1;
    00863     double epz1;
    00864
    00866     double epx2;
    00868     double epy2;
    00870     double epz2;
    00871 };
    00872
    00873
    00874
    00880 struct DL_DimLinearData {
    00885     DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1,
    00886                      double ddpx2, double ddpy2, double ddpz2,
    00887                      double dAngle, double dOblique) {
    00888
    00889         dpx1 = ddpx1;
    00890         dpy1 = ddpy1;
    00891         dpz1 = ddpz1;
    00892
    00893         dpx2 = ddpx2;
    00894         dpy2 = ddpy2;
    00895         dpz2 = ddpz2;
    00896
    00897         angle = dAngle;
    00898         oblique = dOblique;
    00899     }
    00900
    00902     double dpx1;
    00904     double dpy1;
    00906     double dpz1;
    00907
    00909     double dpx2;
    00911     double dpy2;
    00913     double dpz2;
    00914
    00916     double angle;
    00918     double oblique;
    00919 };
    00920
    00921
    00922
    00928 struct DL_DimRadialData {
    00933     DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) {
    00934         dpx = ddpx;
    00935         dpy = ddpy;
    00936         dpz = ddpz;
    00937
    00938         leader = dleader;
    00939     }
    00940
    00942     double dpx;
    00944     double dpy;
    00946     double dpz;
    00947
    00949     double leader;
    00950 };
    00951
    00952
    00953
    00959 struct DL_DimDiametricData {
    00964     DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) {
    00965         dpx = ddpx;
    00966         dpy = ddpy;
    00967         dpz = ddpz;
    00968
    00969         leader = dleader;
    00970     }
    00971
    00973     double dpx;
    00975     double dpy;
    00977     double dpz;
    00978
    00980     double leader;
    00981 };
    00982
    00983
    00984
    00990 struct DL_DimAngularData {
    00995     DL_DimAngularData(double ddpx1, double ddpy1, double ddpz1,
    00996                       double ddpx2, double ddpy2, double ddpz2,
    00997                       double ddpx3, double ddpy3, double ddpz3,
    00998                       double ddpx4, double ddpy4, double ddpz4) {
    00999
    01000         dpx1 = ddpx1;
    01001         dpy1 = ddpy1;
    01002         dpz1 = ddpz1;
    01003
    01004         dpx2 = ddpx2;
    01005         dpy2 = ddpy2;
    01006         dpz2 = ddpz2;
    01007
    01008         dpx3 = ddpx3;
    01009         dpy3 = ddpy3;
    01010         dpz3 = ddpz3;
    01011
    01012         dpx4 = ddpx4;
    01013         dpy4 = ddpy4;
    01014         dpz4 = ddpz4;
    01015     }
    01016
    01018     double dpx1;
    01020     double dpy1;
    01022     double dpz1;
    01023
    01025     double dpx2;
    01027     double dpy2;
    01029     double dpz2;
    01030
    01032     double dpx3;
    01034     double dpy3;
    01036     double dpz3;
    01037
    01039     double dpx4;
    01041     double dpy4;
    01043     double dpz4;
    01044 };
    01045
    01046
    01052 struct DL_DimAngular3PData {
    01057     DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1,
    01058                         double ddpx2, double ddpy2, double ddpz2,
    01059                         double ddpx3, double ddpy3, double ddpz3) {
    01060
    01061         dpx1 = ddpx1;
    01062         dpy1 = ddpy1;
    01063         dpz1 = ddpz1;
    01064
    01065         dpx2 = ddpx2;
    01066         dpy2 = ddpy2;
    01067         dpz2 = ddpz2;
    01068
    01069         dpx3 = ddpx3;
    01070         dpy3 = ddpy3;
    01071         dpz3 = ddpz3;
    01072     }
    01073
    01075     double dpx1;
    01077     double dpy1;
    01079     double dpz1;
    01080
    01082     double dpx2;
    01084     double dpy2;
    01086     double dpz2;
    01087
    01089     double dpx3;
    01091     double dpy3;
    01093     double dpz3;
    01094 };
    01095
    01096
    01097
    01103 struct DL_DimOrdinateData {
    01108     DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1,
    01109                       double ddpx2, double ddpy2, double ddpz2,
    01110                       bool dxtype) {
    01111
    01112         dpx1 = ddpx1;
    01113         dpy1 = ddpy1;
    01114         dpz1 = ddpz1;
    01115
    01116         dpx2 = ddpx2;
    01117         dpy2 = ddpy2;
    01118         dpz2 = ddpz2;
    01119
    01120         xtype = dxtype;
    01121     }
    01122
    01124     double dpx1;
    01126     double dpy1;
    01128     double dpz1;
    01129
    01131     double dpx2;
    01133     double dpy2;
    01135     double dpz2;
    01136
    01138     bool xtype;
    01139 };
    01140
    01141
    01142
    01148 struct DL_LeaderData {
    01153     DL_LeaderData(int lArrowHeadFlag,
    01154                   int lLeaderPathType,
    01155                   int lLeaderCreationFlag,
    01156                   int lHooklineDirectionFlag,
    01157                   int lHooklineFlag,
    01158                   double lTextAnnotationHeight,
    01159                   double lTextAnnotationWidth,
    01160                   int lNumber) {
    01161
    01162         arrowHeadFlag = lArrowHeadFlag;
    01163         leaderPathType = lLeaderPathType;
    01164         leaderCreationFlag = lLeaderCreationFlag;
    01165         hooklineDirectionFlag = lHooklineDirectionFlag;
    01166         hooklineFlag = lHooklineFlag;
    01167         textAnnotationHeight = lTextAnnotationHeight;
    01168         textAnnotationWidth = lTextAnnotationWidth;
    01169         number = lNumber;
    01170     }
    01171
    01173     int arrowHeadFlag;
    01175     int leaderPathType;
    01177     int leaderCreationFlag;
    01179     int hooklineDirectionFlag;
    01181     int hooklineFlag;
    01183     double textAnnotationHeight;
    01185     double textAnnotationWidth;
    01187     int number;
    01188 };
    01189
    01190
    01191
    01197 struct DL_LeaderVertexData {
    01202     DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) {
    01203         x = px;
    01204         y = py;
    01205         z = pz;
    01206     }
    01207
    01209     double x;
    01211     double y;
    01213     double z;
    01214 };
    01215
    01216
    01217
    01221 struct DL_HatchData {
    01225     DL_HatchData() {}
    01226
    01231     DL_HatchData(int hNumLoops,
    01232                  bool hSolid,
    01233                  double hScale,
    01234                  double hAngle,
    01235                  const string& hPattern) {
    01236         numLoops = hNumLoops;
    01237         solid = hSolid;
    01238         scale = hScale;
    01239         angle = hAngle;
    01240         pattern = hPattern;
    01241     }
    01242
    01244     int numLoops;
    01246     bool solid;
    01248     double scale;
    01250     double angle;
    01252     string pattern;
    01253 };
    01254
    01255
    01256
    01260 struct DL_HatchLoopData {
    01264     DL_HatchLoopData() {}
    01269     DL_HatchLoopData(int hNumEdges) {
    01270         numEdges = hNumEdges;
    01271     }
    01272
    01274     int numEdges;
    01275 };
    01276
    01277
    01278
    01282 struct DL_HatchEdgeData {
    01286     DL_HatchEdgeData() {
    01287         defined = false;
    01288     }
    01289
    01294     DL_HatchEdgeData(double lx1, double ly1,
    01295                      double lx2, double ly2) {
    01296         x1 = lx1;
    01297         y1 = ly1;
    01298         x2 = lx2;
    01299         y2 = ly2;
    01300         type = 1;
    01301         defined = true;
    01302     }
    01303
    01308     DL_HatchEdgeData(double acx, double acy,
    01309                      double aRadius,
    01310                      double aAngle1, double aAngle2,
    01311                      bool aCcw) {
    01312         cx = acx;
    01313         cy = acy;
    01314         radius = aRadius;
    01315         angle1 = aAngle1;
    01316         angle2 = aAngle2;
    01317         ccw = aCcw;
    01318         type = 2;
    01319         defined = true;
    01320     }
    01321
    01325     int type;
    01326
    01330     bool defined;
    01331
    01333     double x1;
    01335     double y1;
    01337     double x2;
    01339     double y2;
    01341     double cx;
    01343     double cy;
    01345     double radius;
    01347     double angle1;
    01349     double angle2;
    01351     bool ccw;
    01352 };
    01353
    01354
    01355
    01361 struct DL_ImageData {
    01366     DL_ImageData(const string& iref,
    01367                   double iipx, double iipy, double iipz,
    01368                                               double iux, double iuy, double iuz,
    01369                                               double ivx, double ivy, double ivz,
    01370                                               int iwidth, int iheight,
    01371                                               int ibrightness, int icontrast, int ifade) {
    01372         ref = iref;
    01373         ipx = iipx;
    01374         ipy = iipy;
    01375         ipz = iipz;
    01376                       ux = iux;
    01377                       uy = iuy;
    01378                       uz = iuz;
    01379                       vx = ivx;
    01380                       vy = ivy;
    01381                       vz = ivz;
    01382                       width = iwidth;
    01383                       height = iheight;
    01384                       brightness = ibrightness;
    01385                       contrast = icontrast;
    01386                       fade = ifade;
    01387     }
    01388
    01391     string ref;
    01393     double ipx;
    01395     double ipy;
    01397     double ipz;
    01399            double ux;
    01401            double uy;
    01403            double uz;
    01405            double vx;
    01407            double vy;
    01409            double vz;
    01411            int width;
    01413            int height;
    01415            int brightness;
    01417            int contrast;
    01419            int fade;
    01420 };
    01421
    01422
    01423
    01429 struct DL_ImageDefData {
    01434     DL_ImageDefData(const string& iref,
    01435                                              const string& ifile) {
    01436         ref = iref;
    01437                       file = ifile;
    01438     }
    01439
    01442     string ref;
    01443
    01445            string file;
    01446 };
    01447
    01448 #endif
    01449
    01450 // EOF
    01451

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines