VRender.h
Go to the documentation of this file.
1 /*
2  This file is part of the VRender library.
3  Copyright (C) 2005 Cyril Soler (Cyril.Soler@imag.fr)
4  Version 1.0.0, released on June 27, 2005.
5 
6  http://artis.imag.fr/Members/Cyril.Soler/VRender
7 
8  VRender is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  VRender is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with VRender; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
23 /****************************************************************************
24 
25  Copyright (C) 2002-2014 Gilles Debunne. All rights reserved.
26 
27  This file is part of the QGLViewer library version 2.6.3.
28 
29  http://www.libqglviewer.com - contact@libqglviewer.com
30 
31  This file may be used under the terms of the GNU General Public License
32  versions 2.0 or 3.0 as published by the Free Software Foundation and
33  appearing in the LICENSE file included in the packaging of this file.
34  In addition, as a special exception, Gilles Debunne gives you certain
35  additional rights, described in the file GPL_EXCEPTION in this package.
36 
37  libQGLViewer uses dual licensing. Commercial/proprietary software must
38  purchase a libQGLViewer Commercial License.
39 
40  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
41  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
42 
43 *****************************************************************************/
44 
45 #ifndef _VRENDER_H_
46 #define _VRENDER_H_
47 
48 #include "../config.h"
49 #include <QTextStream>
50 #include <QString>
51 
52 #include "../qglviewer.h"
53 
54 namespace vrender
55 {
56  class VRenderParams ;
57  typedef void (*RenderCB)(void *) ;
58  typedef void (*ProgressFunction)(float,const QString&) ;
59 
60  void VectorialRender(RenderCB DrawFunc, void *callback_params, VRenderParams& render_params) ;
61 
62  class VRenderParams
63  {
64  public:
65  VRenderParams() ;
66  ~VRenderParams() ;
67 
69  enum VRenderFormat { EPS, PS, XFIG, SVG };
70 
71  enum VRenderOption { CullHiddenFaces = 0x1,
73  RenderBlackAndWhite = 0x8,
74  AddBackground = 0x10,
75  TightenBoundingBox = 0x20 } ;
76 
77  int sortMethod() { return _sortMethod; }
79 
80  int format() { return _format; }
81  void setFormat(VRenderFormat f) { _format = f; }
82 
83  const QString filename() { return _filename ; }
84  void setFilename(const QString& filename) ;
85 
86  void setOption(VRenderOption,bool) ;
87  bool isEnabled(VRenderOption) ;
88 
90 
91  private:
92  int _error;
95 
97 
98  unsigned int _options; // _DrawMode; _ClearBG; _TightenBB;
99  QString _filename;
100 
101  friend void VectorialRender( RenderCB render_callback,
102  void *callback_params,
103  VRenderParams& vparams);
104  friend class ParserGL ;
105  friend class Exporter ;
106  friend class BSPSortMethod ;
107  friend class VisibilityOptimizer ;
108  friend class TopologicalSortMethod ;
109  friend class TopologicalSortUtils ;
110 
111  int& error() { return _error ; }
112  int& size() { static int size=1000000; return size ; }
113 
114  void progress(float,const QString&) ;
115  };
116 }
117 #endif
118 
vrender::VRenderParams::CullHiddenFaces
@ CullHiddenFaces
Definition: VRender.h:91
vrender::VRenderParams::_error
int _error
Definition: VRender.h:112
vrender::VRenderParams::VRenderSortMethod
VRenderSortMethod
Definition: VRender.h:88
vrender::VRenderParams::BSPSort
@ BSPSort
Definition: VRender.h:88
vrender::VRenderParams::setFormat
void setFormat(VRenderFormat f)
Definition: VRender.h:101
vrender::VRenderParams::filename
const QString filename()
Definition: VRender.h:103
vrender::VRenderParams
Definition: VRender.h:82
vrender::VRenderParams::_format
VRenderFormat _format
Definition: VRender.h:114
vrender::VRenderParams::PS
@ PS
Definition: VRender.h:89
vrender::TopologicalSortMethod
Definition: SortMethod.h:108
vrender::VRenderParams::setFilename
void setFilename(const QString &filename)
Definition: VRender.cpp:260
vrender::VRenderParams::error
int & error()
Definition: VRender.h:131
vrender::RenderCB
void(* RenderCB)(void *)
Definition: VRender.h:77
vrender::VRenderParams::progress
void progress(float, const QString &)
Definition: VRender.cpp:255
vrender::ParserGL
Definition: ParserGL.h:76
vrender::VRenderParams::VectorialRender
friend void VectorialRender(RenderCB render_callback, void *callback_params, VRenderParams &vparams)
vrender::VRenderParams::TightenBoundingBox
@ TightenBoundingBox
Definition: VRender.h:95
vrender::VRenderParams::setProgressFunction
void setProgressFunction(ProgressFunction pf)
Definition: VRender.h:109
vrender::VRenderParams::AdvancedTopologicalSort
@ AdvancedTopologicalSort
Definition: VRender.h:88
vrender::VRenderParams::setSortMethod
void setSortMethod(VRenderParams::VRenderSortMethod s)
Definition: VRender.h:98
vrender::VRenderParams::RenderBlackAndWhite
@ RenderBlackAndWhite
Definition: VRender.h:93
vrender::VRenderParams::size
int & size()
Definition: VRender.h:132
vrender::TopologicalSortUtils
Definition: TopologicalSortMethod.cpp:62
vrender::VRenderParams::setOption
void setOption(VRenderOption, bool)
Definition: VRender.cpp:265
vrender::VRenderParams::_progress_function
ProgressFunction _progress_function
Definition: VRender.h:116
vrender::VRenderParams::XFIG
@ XFIG
Definition: VRender.h:89
vrender::VRenderParams::NoSorting
@ NoSorting
Definition: VRender.h:88
vrender::VRenderParams::format
int format()
Definition: VRender.h:100
vrender::VectorialRender
void VectorialRender(RenderCB DrawFunc, void *callback_params, VRenderParams &render_params)
Definition: VRender.cpp:69
vrender::VRenderParams::_sortMethod
VRenderSortMethod _sortMethod
Definition: VRender.h:113
vrender::VRenderParams::OptimizeBackFaceCulling
@ OptimizeBackFaceCulling
Definition: VRender.h:92
vrender::Exporter
Definition: Exporter.h:79
vrender::VRenderParams::TopologicalSort
@ TopologicalSort
Definition: VRender.h:88
vrender::VRenderParams::isEnabled
bool isEnabled(VRenderOption)
Definition: VRender.cpp:273
vrender::VRenderParams::AddBackground
@ AddBackground
Definition: VRender.h:94
vrender
Definition: AxisAlignedBox.h:48
vrender::VRenderParams::VRenderOption
VRenderOption
Definition: VRender.h:91
vrender::VRenderParams::SVG
@ SVG
Definition: VRender.h:89
vrender::VRenderParams::~VRenderParams
~VRenderParams()
Definition: VRender.cpp:251
vrender::VRenderParams::_options
unsigned int _options
Definition: VRender.h:118
vrender::BSPSortMethod
Definition: SortMethod.h:99
vrender::ProgressFunction
void(* ProgressFunction)(float, const QString &)
Definition: VRender.h:78
vrender::VisibilityOptimizer
Definition: Optimizer.h:86
vrender::VRenderParams::VRenderFormat
VRenderFormat
Definition: VRender.h:89
vrender::VRenderParams::EPS
@ EPS
Definition: VRender.h:89
vrender::VRenderParams::_filename
QString _filename
Definition: VRender.h:119
vrender::VRenderParams::VRenderParams
VRenderParams()
Definition: VRender.cpp:242
vrender::VRenderParams::sortMethod
int sortMethod()
Definition: VRender.h:97


octovis
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Thu Apr 3 2025 02:40:44