home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum23.lzh
/
f23b
/
SOFTWARE
/
PDRAW
/
header.h
< prev
next >
Wrap
Text File
|
1992-01-15
|
4KB
|
119 lines
#define MAXCHAR 1000 /* Maximum number of chars in a line */
#define MAXPTS 2000 /* Maximum no of points */
#define MAXTYPE 100 /* Maximum no of line/marker types */
#define N 4 /* The size of all matrices */
#define MAXKEY 20 /* Maximum no of keywords */
#define YES 1
#define NO 0
#define ON 1
#define OFF 0
#define TRUE 1
#define FALSE 0
#define SMALL 1.0e-10
#define esc '\033' /* ESC character (ascii) */
#define PSFILE "dataplot.ps" /* Postscript file */
#define SUN_LIN 4
#define SUN_MKR 96
#define HP_LIN 9
#define HP_MKR 5
#define PS_LIN 11
#define PS_MKR 17
#define PSMAX 500
#define PSMIN 100
/* input formats */
#define CONV 0
#define PIF 1
typedef double matrix[N][N]; /* 2D Matrix array */
/* Data structure for point/curve storage */
typedef struct {
double x;
double y;
double z;
} xyzdata; /* xyz coordinates */
typedef struct {
double xl;
double xr;
double yb;
double yt;
} box; /* box dimensions */
typedef struct node_strct {
double x;
double y;
double z;
struct node_strct *next;
struct node_strct *prev;
} node; /* structure containing xyz data points */
typedef struct segm_strct {
struct node_strct *head; /* pointer to first node */
struct node_strct *tail; /* pointer to last node */
struct segm_strct *next;
struct segm_strct *prev;
double zave; /* average z value of the points */
} segm; /* a single line */
typedef struct node_strct *nodeptr;
typedef struct segm_strct *segmptr;
/* This linked list stores the names of all the plotfiles */
typedef struct pfile_strct {
char plotfile[MAXCHAR];
int format;
struct pfile_strct *prev;
struct pfile_strct *next;
} pfile;
typedef struct pfile_strct *pfileptr;
#ifndef MAIN
extern segmptr segmhead; /* pointer to first segment */
extern segmptr segmtail; /* pointer to last segment */
extern pfileptr pfilehead;
extern pfileptr pfiletail;
/* some plot options */
extern char *term; /* terminal type */
extern char xlabel[MAXCHAR]; /* x-label */
extern char ylabel[MAXCHAR]; /* y-label */
extern char zlabel[MAXCHAR]; /* z-label */
extern char toplabel[MAXCHAR]; /* header label */
extern char printer[MAXCHAR]; /* printer type */
/* info for scaling and transformations */
extern xyzdata eyepos; /* position of the eye/camera */
extern xyzdata viewcenter; /* center of view */
extern xyzdata viewup; /* up direction of view */
extern box window; /* window dimensions relative to center */
extern box viewport; /* viewport in normalized device coordinates*/
extern matrix I; /* identity matrix */
extern matrix view_transfo; /* matrix for view transformation */
extern double ndc_width; /* width in ndc space */
extern double ndc_height; /* height in ndc space */
/* plotting options/parameters */
extern int grid,equalscale,postscript,printplot,noplot;
extern int xticks,yticks,zticks;
extern int line,linechange,marker,markerchange;
extern int linetype[MAXTYPE], markertype[MAXTYPE];
extern int hiddenline, quick_sort, nosort;
extern double scale;
/* plot boundaries */
extern double xmin, xmax, ymin, ymax, zmin, zmax;
extern double pxmin, pymin, pxmax, pymax;
#endif