xgledit.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2010, 2013                            */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 #ifndef XGLEDIT_H
00012 #define XGLEDIT_H
00013 
00014 #ifndef _LIBC_LIMITS_H_
00015 #include <limits.h>
00016 #endif
00017 
00018 #ifndef __gl_h_
00019 #include <GL/gl.h>
00020 #endif
00021 #ifndef __glx_h__
00022 #include <GL/glx.h>
00023 #endif
00024 
00025 #ifndef PKVARIA_H
00026 #include "pkvaria.h"
00027 #endif
00028 #ifndef PKNUM_H
00029 #include "pknum.h"
00030 #endif
00031 #ifndef PKGEOM_H
00032 #include "pkgeom.h"
00033 #endif
00034 #ifndef CAMERA_H
00035 #include "camera.h"
00036 #endif
00037 #ifndef XGEDIT_H
00038 #include "xgedit.h"
00039 #endif
00040 #ifndef XGLERGB_H
00041 #include "xglergb.h"
00042 #endif
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00048 #define xgleCopyGLRect(w,h,x,y) \
00049   XCopyArea(xgedisplay,xglepixmap,xgepixmap,xgegc,0,xge_MAX_HEIGHT-h,w,h,x,y)
00050 #define xgleClearColor3fv(rgb) \
00051   glClearColor(rgb[0],rgb[1],rgb[2],1.0)
00052 
00053 extern Pixmap      xglepixmap;
00054 extern XID         _xglepixmap;
00055 extern void        *xglecontext;
00056 
00057 extern GLfloat xgle_palette[XGLE_PALETTE_LENGTH][3];
00058 
00059 void xgle_Init ( int argc, char *argv[],
00060                  int (*callback)(xge_widget*,int,int,short,short),
00061                  char *title,
00062                  boolean depth, boolean accum, boolean stencil );
00063 void xgle_Cleanup ( void );
00064 
00065 void xgle_SetIdentMapping ( xge_widget *er );
00066 
00067 boolean xgle_SetGLCameraf ( CameraRecf *CPos );
00068 boolean xgle_SetGLCamerad ( CameraRecd *CPos );
00069 
00070 boolean xgle_SetGLaccCameraf ( CameraRecf *CPos,
00071                                float pixdx, float pixdy,
00072                                float eyedx, float eyedy, float focus );
00073 boolean xgle_SetGLaccCamerad ( CameraRecd *CPos,
00074                                double pixdx, double pixdy,
00075                                double eyedx, double eyedy, double focus );
00076 
00077 void xgle_MultMatrix3f ( trans3f *tr );
00078 void xgle_MultMatrix3d ( trans3d *tr );
00079 
00080 void xgleDrawPoint ( int x, int y );
00081 void xgleDrawPoints ( int n, XPoint *p );
00082 void xgleDrawLine ( int x0, int y0, int x1, int y1 );
00083 void xgleDrawRectangle ( int w, int h, int x, int y );
00084 void xgleDrawString ( char *string, int x, int y );
00085 
00086 
00087 void xgle_DrawGeomWinBackground ( xge_widget *er, GLbitfield mask );
00088 
00089 void xgle_2DwinfDrawCursorPos ( xge_2Dwinf *_2Dwin, short x, short y );
00090 void xgle_2DwinfDrawAxes ( xge_2Dwinf *_2Dwin );
00091 void xgle_2DwindDrawCursorPos ( xge_2Dwind *_2Dwin, short x, short y );
00092 void xgle_2DwindDrawAxes ( xge_2Dwind *_2Dwin );
00093 
00094 void xgle_3DwinfDrawCursorPos ( xge_3Dwinf *_3Dwin,
00095                                 int id, short x, short y );
00096 void xgle_3DwindDrawCursorPos ( xge_3Dwind *_3Dwin,
00097                                 int id, short x, short y );
00098 
00099 void xgle_T2KnotWinfDrawCursorPos ( xge_T2KnotWinf *T2win, short x, short y );
00100 void xgle_T2KnotWindDrawCursorPos ( xge_T2KnotWind *T2win, short x, short y );
00101 
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105 
00106 #endif /*XGLEDIT_H*/
00107