OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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-2011 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