postscript_io.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library 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 GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 00020 #ifndef LIBMESH_POSTSCRIPT_IO_H 00021 #define LIBMESH_POSTSCRIPT_IO_H 00022 00023 // Local includes 00024 #include "libmesh/libmesh_common.h" 00025 #include "libmesh/mesh_output.h" 00026 //#include "libmesh/dense_matrix.h" 00027 #include "libmesh/point.h" 00028 00029 // C++ includes 00030 #include <vector> 00031 #include <sstream> 00032 00033 namespace libMesh 00034 { 00035 00036 // Forward declarations 00037 class MeshBase; 00038 class Elem; 00039 00051 class PostscriptIO : public MeshOutput<MeshBase> 00052 { 00053 public: 00057 explicit 00058 PostscriptIO (const MeshBase& mesh); 00059 00063 virtual ~PostscriptIO (); 00064 00068 virtual void write (const std::string& ); 00069 00078 Real shade_value; 00079 00086 Real line_width; 00087 00091 void plot_quadratic_elem(const Elem* elem); 00092 00096 void plot_linear_elem(const Elem* elem); 00097 00098 private: 00104 void _compute_edge_bezier_coeffs(const Elem* elem); 00105 00111 //DenseMatrix<float> _M; 00112 static const float _bezier_transform[3][3]; 00113 00118 std::vector<Point> _bezier_coeffs; 00119 00123 Point _offset; 00124 00128 Real _scale; 00129 00133 Point _current_point; 00134 00140 std::ostringstream _cell_string; 00141 00145 std::ofstream _out; 00146 }; 00147 00148 } // namespace libMesh 00149 00150 #endif // LIBMESH_POSTSCRIPT_IO_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: