Defines | Functions | Variables

/home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/OpenTissue/third_party/bundled/Triangle/showme.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>

Defines

#define REAL   double
#define FILENAMESIZE   2048
#define INPUTLINESIZE   1024
#define STARTWIDTH   414
#define STARTHEIGHT   414
#define MINWIDTH   50
#define MINHEIGHT   50
#define BUTTONHEIGHT   21
#define BUTTONROWS   3
#define PANELHEIGHT   (BUTTONHEIGHT * BUTTONROWS)
#define MAXCOLORS   64
#define IMAGE_TYPES   7
#define NOTHING   -1
#define NODE   0
#define POLY   1
#define ELE   2
#define EDGE   3
#define PART   4
#define ADJ   5
#define VORO   6
#define STARTEXPLOSION   0.5

Functions

int load_image ()
void syntax ()
void info ()
void set_filenames (char *filename, int lowermeshnumber)
void parsecommandline (int argc, char **argv)
void free_inc (int inc)
void move_inc (int inc)
void unload_inc (int inc)
void showme_init ()
char * readline (char *string, FILE *infile, char *infilename)
char * findfield (char *string)
int load_node (char *fname, int *firstnumber, int *nodes, int *dim, REAL **ptr, REAL *xmin, REAL *ymin, REAL *xmax, REAL *ymax)
int load_poly (int inc, char *fname, int *firstnumber, int *pnodes, int *dim, int *edges, int *holes, REAL **nodeptr, int **edgeptr, REAL **holeptr, REAL *xmin, REAL *ymin, REAL *xmax, REAL *ymax)
int load_ele (char *fname, int firstnumber, int nodes, int *elems, int *corners, int **ptr)
int load_edge (char *fname, int firstnumber, int nodes, int *edges, int **edgeptr, REAL **normptr)
int load_part (char *fname, int dim, int firstnumber, int elems, REAL *nodeptr, int *eleptr, int *parts, int **partition, REAL **partcenter, REAL **partshift)
int load_adj (char *fname, int *subdomains, int **ptr)
void findpartshift (int parts, REAL explosion, REAL *partcenter, REAL *partshift)
int load_image (int inc, int image)
void choose_image (int inc, int image)
Window make_button (char *name, int x, int y, int width)
void make_buttons (int y)
void fill_button (Window button)
void draw_buttons ()
void showme_window (int argc, char **argv)
void draw_node (int nodes, int dim, REAL *ptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void draw_poly (int nodes, int dim, int edges, int holes, REAL *nodeptr, int *edgeptr, REAL *holeptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void draw_ele (int inc, int elems, int corners, int *ptr, int *partition, REAL *shift, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void draw_edge (int nodes, int dim, int edges, REAL *nodeptr, int *edgeptr, REAL *normptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void draw_adj (int dim, int subdomains, int *ptr, REAL *center, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void draw (int inc, int image, REAL xmin, REAL ymin, REAL xmax, REAL ymax)
void addps (char *instring, char *outstring, int eps)
int print_head (char *fname, FILE **file, int llcornerx, int llcornery, int eps)
void print_node (FILE *nodefile, int nodes, int dim, REAL *ptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void print_poly (FILE *polyfile, int nodes, int dim, int edges, int holes, REAL *nodeptr, int *edgeptr, REAL *holeptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset)
void print_ele (FILE *elefile, int nodes, int dim, int elems, int corners, REAL *nodeptr, int *eleptr, int *partition, REAL *shift, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset, int llcornerx, int llcornery)
void print_edge (FILE *edgefile, int nodes, int dim, int edges, REAL *nodeptr, int *edgeptr, REAL *normptr, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset, int llcornerx, int llcornery)
void print_adj (FILE *adjfile, int dim, int subdomains, int *ptr, REAL *center, REAL xscale, REAL yscale, REAL xoffset, REAL yoffset, int llcornerx, int llcornery)
void print (int inc, int image, REAL xmin, REAL ymin, REAL xmax, REAL ymax, int eps)
int main (int argc, char **argv)

Variables

Display * display
int screen
Window rootwindow
Window mainwindow
Window quitwin
Window leftwin
Window rightwin
Window upwin
Window downwin
Window resetwin
Window pswin
Window epswin
Window expwin
Window exppluswin
Window expminuswin
Window widthpluswin
Window widthminuswin
Window versionpluswin
Window versionminuswin
Window fillwin
Window nodewin [2]
Window polywin [2]
Window elewin [2]
Window edgewin [2]
Window partwin [2]
Window adjwin [2]
Window voronoiwin [2]
int windowdepth
XEvent event
Colormap rootmap
XFontStruct * font
int width
int height
int black
int white
int showme_foreground
GC fontgc
GC blackfontgc
GC linegc
GC trianglegc
int colors [MAXCOLORS]
XColor rgb [MAXCOLORS]
int color
int start_image
int current_image
int start_inc
int current_inc
int loweriteration
int line_width
int loaded [2][IMAGE_TYPES]
REAL xlo [2][IMAGE_TYPES]
REAL ylo [2][IMAGE_TYPES]
REAL xhi [2][IMAGE_TYPES]
REAL yhi [2][IMAGE_TYPES]
REAL xscale
REAL yscale
REAL xoffset
REAL yoffset
int zoom
int nodes [2]
int node_dim [2]
REAL * nodeptr [2]
int polynodes [2]
int poly_dim [2]
int polyedges [2]
int polyholes [2]
REAL * polynodeptr [2]
REAL * polyholeptr [2]
int * polyedgeptr [2]
int elems [2]
int ele_corners [2]
int * eleptr [2]
int edges [2]
int * edgeptr [2]
REAL * normptr [2]
int subdomains [2]
int * partpart [2]
REAL * partcenter [2]
REAL * partshift [2]
int adjsubdomains [2]
int * adjptr [2]
int vnodes [2]
int vnode_dim [2]
REAL * vnodeptr [2]
int vedges [2]
int * vedgeptr [2]
REAL * vnormptr [2]
int firstnumber [2]
int quiet
int fillelem
int bw_ps
int explode
REAL explosion
char filename [FILENAMESIZE]
char nodefilename [2][FILENAMESIZE]
char polyfilename [2][FILENAMESIZE]
char elefilename [2][FILENAMESIZE]
char edgefilename [2][FILENAMESIZE]
char partfilename [2][FILENAMESIZE]
char adjfilename [2][FILENAMESIZE]
char vnodefilename [2][FILENAMESIZE]
char vedgefilename [2][FILENAMESIZE]
char * colorname []

Define Documentation

#define ADJ   5
#define BUTTONHEIGHT   21
#define BUTTONROWS   3
#define EDGE   3
#define ELE   2
#define FILENAMESIZE   2048
#define IMAGE_TYPES   7
#define INPUTLINESIZE   1024
#define MAXCOLORS   64
#define MINHEIGHT   50
#define MINWIDTH   50
#define NODE   0
#define NOTHING   -1
#define PANELHEIGHT   (BUTTONHEIGHT * BUTTONROWS)
#define PART   4
#define POLY   1
#define REAL   double
#define STARTEXPLOSION   0.5
#define STARTHEIGHT   414
#define STARTWIDTH   414
#define VORO   6

Function Documentation

void addps ( char *  instring,
char *  outstring,
int  eps 
)
void choose_image ( int  inc,
int  image 
)
void draw ( int  inc,
int  image,
REAL  xmin,
REAL  ymin,
REAL  xmax,
REAL  ymax 
)
void draw_adj ( int  dim,
int  subdomains,
int *  ptr,
REAL *  center,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void draw_buttons (  ) 
void draw_edge ( int  nodes,
int  dim,
int  edges,
REAL *  nodeptr,
int *  edgeptr,
REAL *  normptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void draw_ele ( int  inc,
int  elems,
int  corners,
int *  ptr,
int *  partition,
REAL *  shift,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void draw_node ( int  nodes,
int  dim,
REAL *  ptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void draw_poly ( int  nodes,
int  dim,
int  edges,
int  holes,
REAL *  nodeptr,
int *  edgeptr,
REAL *  holeptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void fill_button ( Window  button  ) 
char* findfield ( char *  string  ) 
void findpartshift ( int  parts,
REAL  explosion,
REAL *  partcenter,
REAL *  partshift 
)
void free_inc ( int  inc  ) 
void info (  ) 
int load_adj ( char *  fname,
int *  subdomains,
int **  ptr 
)
int load_edge ( char *  fname,
int  firstnumber,
int  nodes,
int *  edges,
int **  edgeptr,
REAL **  normptr 
)
int load_ele ( char *  fname,
int  firstnumber,
int  nodes,
int *  elems,
int *  corners,
int **  ptr 
)
int load_image ( int  inc,
int  image 
)
int load_image (  ) 
int load_node ( char *  fname,
int *  firstnumber,
int *  nodes,
int *  dim,
REAL **  ptr,
REAL *  xmin,
REAL *  ymin,
REAL *  xmax,
REAL *  ymax 
)
int load_part ( char *  fname,
int  dim,
int  firstnumber,
int  elems,
REAL *  nodeptr,
int *  eleptr,
int *  parts,
int **  partition,
REAL **  partcenter,
REAL **  partshift 
)
int load_poly ( int  inc,
char *  fname,
int *  firstnumber,
int *  pnodes,
int *  dim,
int *  edges,
int *  holes,
REAL **  nodeptr,
int **  edgeptr,
REAL **  holeptr,
REAL *  xmin,
REAL *  ymin,
REAL *  xmax,
REAL *  ymax 
)
int main ( int  argc,
char **  argv 
)
Window make_button ( char *  name,
int  x,
int  y,
int  width 
)
void make_buttons ( int  y  ) 
void move_inc ( int  inc  ) 
void parsecommandline ( int  argc,
char **  argv 
)
void print ( int  inc,
int  image,
REAL  xmin,
REAL  ymin,
REAL  xmax,
REAL  ymax,
int  eps 
)
void print_adj ( FILE *  adjfile,
int  dim,
int  subdomains,
int *  ptr,
REAL *  center,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset,
int  llcornerx,
int  llcornery 
)
void print_edge ( FILE *  edgefile,
int  nodes,
int  dim,
int  edges,
REAL *  nodeptr,
int *  edgeptr,
REAL *  normptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset,
int  llcornerx,
int  llcornery 
)
void print_ele ( FILE *  elefile,
int  nodes,
int  dim,
int  elems,
int  corners,
REAL *  nodeptr,
int *  eleptr,
int *  partition,
REAL *  shift,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset,
int  llcornerx,
int  llcornery 
)
int print_head ( char *  fname,
FILE **  file,
int  llcornerx,
int  llcornery,
int  eps 
)
void print_node ( FILE *  nodefile,
int  nodes,
int  dim,
REAL *  ptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
void print_poly ( FILE *  polyfile,
int  nodes,
int  dim,
int  edges,
int  holes,
REAL *  nodeptr,
int *  edgeptr,
REAL *  holeptr,
REAL  xscale,
REAL  yscale,
REAL  xoffset,
REAL  yoffset 
)
char* readline ( char *  string,
FILE *  infile,
char *  infilename 
)
void set_filenames ( char *  filename,
int  lowermeshnumber 
)
void showme_init (  ) 
void showme_window ( int  argc,
char **  argv 
)
void syntax (  ) 
void unload_inc ( int  inc  ) 

Variable Documentation

char adjfilename[2][FILENAMESIZE]
int* adjptr[2]
int adjsubdomains[2]
Window adjwin[2]
int black
int bw_ps
int color
char* colorname[]
Initial value:
 {"aquamarine", "red", "green yellow", "magenta",
                     "yellow", "green", "orange", "blue",
                     "white", "sandy brown", "cyan", "moccasin",
                     "cadet blue", "coral", "cornflower blue", "sky blue",
                     "firebrick", "forest green", "gold", "goldenrod",
                     "gray", "hot pink", "chartreuse", "pale violet red",
                     "indian red", "khaki", "lavender", "light blue",
                     "light gray", "light steel blue", "lime green", "azure",
                     "maroon", "medium aquamarine", "dodger blue", "honeydew",
                     "medium orchid", "medium sea green", "moccasin",
                     "medium slate blue", "medium spring green",
                     "medium turquoise", "medium violet red",
                     "orange red", "chocolate", "light goldenrod",
                     "orchid", "pale green", "pink", "plum",
                     "purple", "salmon", "sea green",
                     "sienna", "slate blue", "spring green",
                     "steel blue", "tan", "thistle", "turquoise",
                     "violet", "violet red", "wheat",
                     "yellow green"}
int colors[MAXCOLORS]
Display* display
Window downwin
char edgefilename[2][FILENAMESIZE]
int* edgeptr[2]
int edges[2]
Window edgewin[2]
int ele_corners[2]
char elefilename[2][FILENAMESIZE]
int elems[2]
int* eleptr[2]
Window elewin[2]
Window epswin
XEvent event
int explode
REAL explosion
Window expminuswin
Window exppluswin
Window expwin
char filename[FILENAMESIZE]
int fillelem
Window fillwin
int firstnumber[2]
XFontStruct* font
GC fontgc
int height
Window leftwin
GC linegc
int loaded[2][IMAGE_TYPES]
Window mainwindow
int node_dim[2]
char nodefilename[2][FILENAMESIZE]
REAL* nodeptr[2]
int nodes[2]
Window nodewin[2]
REAL* normptr[2]
REAL* partcenter[2]
char partfilename[2][FILENAMESIZE]
int* partpart[2]
REAL * partshift[2]
Window partwin[2]
int poly_dim[2]
int* polyedgeptr[2]
int polyedges[2]
char polyfilename[2][FILENAMESIZE]
REAL * polyholeptr[2]
int polyholes[2]
REAL* polynodeptr[2]
int polynodes[2]
Window polywin[2]
Window pswin
int quiet
Window quitwin
Window resetwin
XColor rgb[MAXCOLORS]
Window rightwin
Colormap rootmap
Window rootwindow
int screen
int start_inc
int subdomains[2]
Window upwin
char vedgefilename[2][FILENAMESIZE]
int* vedgeptr[2]
int vedges[2]
int vnode_dim[2]
char vnodefilename[2][FILENAMESIZE]
REAL* vnodeptr[2]
int vnodes[2]
REAL* vnormptr[2]
Window voronoiwin[2]
int white
int width
Window widthminuswin
Window widthpluswin
REAL xhi[2][IMAGE_TYPES]
REAL xlo[2][IMAGE_TYPES]
REAL xoffset
REAL xscale
REAL yhi[2][IMAGE_TYPES]
REAL ylo[2][IMAGE_TYPES]
REAL yoffset
REAL yscale
int zoom