dxf_writer.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009 by Ulrich Friedrich Klank <klank@in.tum.de>
00003  * 
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 3 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef DXFWRTIER_H
00019 #define DXFWRTIER_H
00020 #include "File.h"
00021 #define _USE_MATH_DEFINES
00022 #include "math.h"
00023 
00024 #ifdef WIN32
00025 #define EXPORT __declspec(dllexport)
00026 #else
00027 #define EXPORT
00028 #endif
00029 
00030 typedef struct
00031 {
00032   double x;
00033   double y;
00034   double z;
00035 } Point3d_t;
00036 
00037 typedef std::vector<Point3d_t> Polygon_t;
00038 typedef std::vector<std::pair<Polygon_t, Polygon_t> > Mesh_t;
00039 
00040 class dxfwriter :
00041 public linfile::File
00042 {
00043  public:
00044   static bool WriteMesh(Mesh_t mesh,  std::string FileName);
00045   EXPORT dxfwriter(std::string FileName);
00046   EXPORT ~dxfwriter(void);
00047   EXPORT void Write3dLINE(double startx, double starty, double startz, double endx, double endy, double endz);
00048   EXPORT void WriteBox(double offsetx, double offsety, double offsetz, double sizex, double sizey, double sizez);
00049   EXPORT void WriteSolid(double dx0, double dy0, double dz0,
00050                          double dx1, double dy1, double dz1,
00051                          double dx2, double dy2, double dz2,
00052                          double dx3, double dy3, double dz3);
00053   EXPORT void WriteSolid(double dx0, double dy0, double dz0,
00054                          double dx1, double dy1, double dz1,
00055                          double dx2, double dy2, double dz2);
00056   void WriteCylinder(double centerx0, double centery0, double centerz0,
00057                      double radius, double height, double angleX);
00058   EXPORT void WriteBoxFromPoints(double dx0, double dy0, double dz0,
00059                                  double dx1, double dy1, double dz1,
00060                                  double dx2, double dy2, double dz2,
00061                                  double dx3, double dy3, double dz3,
00062                                  double dx4, double dy4, double dz4,
00063                                  double dx5, double dy5, double dz5,
00064                                  double dx6, double dy6, double dz6,
00065                                  double dx7, double dy7, double dz7);
00066  private:
00067   void WriteConstHeader();
00068   void WriteConstTail();
00069   void WriteGroup(std::string st, int value);
00070   void WriteGroup(std::string st, double value);
00071   void WriteGroup(int st, int value);
00072   void WriteGroup(int st, double value);
00073   void WriteGroupHex(int st, double value);
00074  private:
00075   int m_handle;
00076 };
00077 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


pcl_cloud_tools
Author(s): Nico Blodow, Zoltan-Csaba Marton, Dejan Pangercic
autogenerated on Thu May 23 2013 17:11:35