OpenStructure
gost_exporter.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_GFX_GOST_EXPORTER_HH
20 #define OST_GFX_GOST_EXPORTER_HH
21 
22 #include <cstdio>
23 
24 #include "exporter.hh"
25 
26 namespace ost { namespace gfx {
27 
29 {
30 public:
31  GostExporter(const std::string& fname);
32  virtual ~GostExporter();
33 
34  // exporter interface
35  virtual void SceneStart(const Scene* scene);
36  virtual void SceneEnd(const Scene* scene);
37  virtual void NodeStart(const std::string& name, NodeType t);
38  virtual void NodeEnd(const std::string& name);
39  virtual void WriteVertexData(const float* v, const float* n, const float* c, const float* t,
40  size_t stride, size_t count);
41  virtual void WritePointData(const unsigned int* i, size_t count);
42  virtual void WriteLineData(const unsigned int* ij, size_t count);
43  virtual void WriteTriData(const unsigned int* ijk, size_t count);
44  virtual void WriteQuadData(const unsigned int* ijkl, size_t count);
45 
46  // gost interface
47  void SetFrame(size_t f);
48 private:
49  FILE* file_;
50 };
51 
52 }} // ns
53 
54 #endif
virtual void WriteLineData(const unsigned int *ij, size_t count)
virtual void WriteVertexData(const float *v, const float *n, const float *c, const float *t, size_t stride, size_t count)
virtual void WriteQuadData(const unsigned int *ijkl, size_t count)
virtual void SceneEnd(const Scene *scene)
void SetFrame(size_t f)
virtual void WritePointData(const unsigned int *i, size_t count)
virtual void SceneStart(const Scene *scene)
virtual void NodeStart(const std::string &name, NodeType t)
GostExporter(const std::string &fname)
virtual void WriteTriData(const unsigned int *ijk, size_t count)
virtual void NodeEnd(const std::string &name)
main class for organization and root for the graphical display
Definition: scene.hh:80
#define DLLEXPORT_OST_GFX
Definition: base.dox:1