Newer
Older
Import / research / 3d-z-maps / mview-0.3.3 / mview / vrml2_mesh.h
@John John on 29 Dec 2020 841 bytes bulk import from macbookpro checkouts
//
//    File: vrml2_mesh.h
//
//    (C) 2000-2008 Helmut Cantzler
//
//    Licensed under the terms of the Lesser General Public License.
//

#ifndef _VRML2_MESH_H
#define _VRML2_MESH_H

#include "mesh.h"

using namespace std;

class Vrml2Mesh : public Mesh
{
public:
  int read(FILE *f, int (*update)(int pos),
	   void (*setTotal)(int size));
  void write(FILE *f, const char *comment = "");

private:
  int newShape(FILE *f, list<Vertex*> *vertices, int shapeNr);
  int newTransform(FILE *f, list<Vertex*> *vertices, int *shapes, int iter);

  // read support methods
  int readNextToken(FILE *f, char *s);
  int readVertex(FILE *f, float *x, float *y, float *z);
  int readTriangle(FILE *f, int *p1, int *p2, int *p3);
  int readTextCoord(FILE *f, float *s, float *t);

  int (*updateProgress)(int pos);

  char buffer[101];
};

#endif