NAME
mesh_to_file - save a mesh structure to a file
SYNOPSIS
#include "mesh.h"
void mesh_to_file(struct mesh *mesh_matrix, char*
mesh_file);
PATH
$CVIPHOME/GEOMETRY/warp.c
DESCRIPTION
The mesh_to_file() saves a mesh structure to a file. The
first 2 integers saved are the numbers of columns and rows
of the mesh. And then the coordinates of each node in the
mesh is saved node by node from the left to the right and
row by row from the top to the bottom. The character string
"mesh_file" holds the mesh file name.
TYPES AND CONSTANTS
struct mesh_node {
int x;
int y;
};
struct mesh {
int width;
int height;
struct mesh_node** nodes;
};
struct float_pair {
float x;
float y;
};
RETURN VALUES
none
EXAMPLE
#include "mesh.h"
#include <CVIPio.h>
void main()
{
char *inputfile;
struct mesh *inmesh;
inmesh = keyboard_to_mesh(); /*This is optional;
one way to create a mesh*/
print_CVIP("0Input the mesh file name: ");
inputfile = getString_CVIP();
mesh_to_file(inmesh,inputfile);
}
BUGS
None at this time
SEE ALSO
file_to_mesh(), keyboard_to_mesh()
AUTHOR
Copyright (C) 1995 SIUE - by Scott Umbaugh and Jianxin Tan.