+/*****************************************************************************
+** This is part of the CTSim program
+** Copyright (C) 1983-2000 Kevin Rosenberg
+**
+** $Id: sgp.h,v 1.4 2000/04/30 19:17:35 kevin Exp $
+** $Log: sgp.h,v $
+** Revision 1.4 2000/04/30 19:17:35 kevin
+** Set up include files for conditional INTERACTIVE_GRAPHICS
+**
+** Revision 1.3 2000/04/28 18:35:21 kevin
+** removed unused files
+**
+** Revision 1.2 2000/04/28 14:14:16 kevin
+** *** empty log message ***
+**
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License (version 2) as
+** published by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+******************************************************************************/
/*----------------------------------------------------------------------*/
/* Standard Graphics Package Header File */
/*----------------------------------------------------------------------*/
#define __H_SGP
#include "kstddef.h"
-
-/* Write modes for CPIX_?????() routines */
-
-#define CPIX_WRT 0
-#define CPIX_XOR 1
-#define CPIX_AND 2
-#define CPIX_OR 3
+#include "kmath.h"
/* device names */
/*-------------------------------------------------------------------------*/
-typedef double GRFMTX_2D[3][3];
-typedef double GRFMTX_3D[4][4];
-
/* circle.c */
void circle(const double r);
void drawarc(double start, double stop, const double r);
-/* cliprect.c */
-int cliprect(double *x1, double *y1, double *x2, double *y2, const double rect[4]);
-/* crt_line.c */
-void crt_line(int x1, int y1, int x2, int y2, int color);
-int prtline(int func, int x1, int y1, int x2, int y2, int arg1, int arg2);
-void crt_line_style(int style);
-/* crt_wdot.c */
-void crt_wdot(int x, int y, int c);
-void ega_wdot(int x, int y, int c);
-void prtdot(int x, int y, int c);
-void prtndc(void);
-void cpix_set(int x, int y, int c);
-void cpix_init(void);
-void cpix_set_wrt_mode(int mode);
-void cpix_calc_addr(void);
-void cpix_set_addr(int addr);
-void cpix_inc_col(void);
-int cpix_get_addr(void);
-void cpix_term(void);
-void cpix_setcolor(int c);
-void cpix_set_at_addr(int addr, int c);
-void cpix_inc_row(void);
-void cpix_set_color(int c);
/* ctm.c */
int ctm_xlat_pre_2(double x, double y);
int ctm_xlat_post_2(double x, double y);
double determ_gmtx_2(GRFMTX_2D a);
/* drawbox.c */
int drawbox(double xmin, double ymin, double xmax, double ymax);
-/* gp.c */
-int gptrace(int state);
-int viewprt3(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax);
-int window3(double xmin, double ymin, double xmax, double ymax);
-int setproj(int pr, double x, double y, double z);
-int setvrp(double x, double y, double z);
-int setvpn(double x, double y, double z);
-int setvup(double x, double y, double z);
-int viewdepth(double front, double back);
-int gpfrontclip(int on_off);
-int gpbackclip(int on_off);
-int calcnper(void);
-int calcnpar(void);
-int calcrot(double rot[5][5]);
-int calcpertrans(void);
-int calcpartrans(void);
-int matident(double mtx[5][5]);
-int matmult(double premtx[5][5], double postmtx[5][5], double result[5][5]);
-int crossprod(struct point *v, struct point *w, struct point *result);
-int transform(double mtx[5][5], double *x, double *y, double *z);
-int homotrans(double mtx[5][5], double *x, double *y, double *z, double *w);
-int moveabs3(double x, double y, double z);
-int moverel3(double xr, double yr, double zr);
-int lineabs3(double x, double y, double z);
-int linerel3(double xr, double yr, double zr);
-int drawline(double xinput, double yinput, double zinput);
-int mastertondc(double *x, double *y, double *z);
-int checkchange(void);
-int initgrf3(void);
-int termgrf3(void);
-int matwrite(double mtx[5][5]);
-int pyr_edge(double x, double y, double z, int *pos);
-int clippyramid(double *x1, double *y1, double *z1, double *x2, double *y2, double *z2, int *accept);
-int cube_edge(double x, double y, double z, int *pos);
-int clipcube(double *x1, double *y1, double *z1, double *x2, double *y2, double *z2, int *accept);
-/* pickbox.c */
-int pickbox(int dev, int *xmin, int *ymin, int *xmax, int *ymax, int xtab[], int ytab[]);
-/* pickloc.c */
-int pickloc(int dev, int *xloc, int *yloc, int xtab[], int ytab[]);
-/* pixblock.c */
-int readblock(char array[], int x1, int y1, int x2, int y2);
-int writeblock(char array[], int x1, int y1, int mode);
-char *allocblock(int x1, int y1, int x2, int y2);
-/* readloc.c */
-int readloc(int dev, int *x, int *y);
-int loc_to_ndc(int xloc, int yloc, float *xndc, float *yndc);
-int readbutt(int dev);
/* sgp.c */
int gp_init_2(void);
int window2(double xmin, double ymin, double xmax, double ymax);
int termgrf2(void);
int flushdevice(int dev);
/* sgptext.c */
-int wrtsymbol(int sym, int x, int y, DEVICE *dev);
-int wrtchar(int ch, int x, int y, CHARSPEC *cspec, DEVICE *dev);
-int wrttext(char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev);
+void wrtsymbol(int sym, int x, int y, DEVICE *dev);
+void wrtchar(int ch, int x, int y, CHARSPEC *cspec, DEVICE *dev);
+void wrttext(char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev);
void crtcolor(int mode, int *f, int *b);
-/* trackloc.c */
-int trackloc(int dev, int *xloc, int *yloc, int (*loc_on)(int x, int y), int (*loc_off)(int x, int y));
+
#endif