#include <math.h>
#include <X11/Intrinsic.h>

#ifndef _Surface_h
#define _Surface_h

typedef struct _XYZRec {
  double x, y, z;
} XYZRec, XYZ;

typedef struct _SurfaceRec {
  int nrows, ncols;
  XYZ **data;
  double minx, maxx, miny, maxy, minz, maxz;
} SurfaceRec, *Surface;


/* Operations and Functions */
extern void CopyDataToSurface(Surface s, int M, int N, XYZ **datapoints);
extern Surface SurfaceCreate();
extern Surface MakeSurfaceWithData(int M,int N, XYZ **datapoints);
extern void SurfaceInsertData(Surface s, int M, int N, XYZ **datapoints);
extern double SurfaceGetMaxx(Surface s);
extern double SurfaceGetMaxy(Surface s);
extern double SurfaceGetMaxz(Surface s);
extern double SurfaceGetMinx(Surface s);
extern double SurfaceGetMiny(Surface s);
extern double SurfaceGetMinz(Surface s);

#endif
