gCAD3D 2.35
ut_GL.h File Reference

Go to the source code of this file.

Macros

#define GR_MODE_DRAW   0
 
#define GR_MODE_SELECT   1
 
#define GR_MODE_FEEDBACK   2
 
#define GR_MODE_NORMAL   3
 
#define GR_MODE_PRINT1   4
 
#define GR_MODE_PRINT2   5
 
#define GR_STATE_WIRE   0
 
#define GR_STATE_SHADE   1
 
#define GR_STATE_HID1   2
 
#define GR_STATE_HID2   3
 
#define GR_STATE_HID3   4
 
#define GL2D_pos_move(dx, dy)   glBitmap (0,0,0.f,0.f,(float)dx,(float)dy,NULL)
 

Functions

void GL2D_pos_move (int dx, int dy)
 
void GL_DefineView (int)
 
void GL_DefineDisp (int, int)
 
void GL_Init__ (int, int, int)
 
void GL_Init0 ()
 
void GL_Init1 ()
 
void GL_Init_View ()
 
void GL_InitPtAtt (int ithick)
 
int GL_InitNewAtt (int, int)
 
void GL_InitSymb ()
 
void GL_InitAFont ()
 
void GL_InitGFont ()
 
int GL_InitGF2 (int ind, int ianz, char mode[], double cx[], double cy[])
 
void GL_InitModelSize (double, int)
 
void GL_Redraw ()
 
void GL_Redraw1 ()
 
void GL_Reframe ()
 
void GL_Reframe1 ()
 
void GL_Translate ()
 
void GL_Translate1 ()
 
void GL_Transl_Vert ()
 
void GL_Transl_VertP (Point *)
 
void GL_Del0 (long)
 
void GL_Delete (long)
 
void GL_GetGLMat0 ()
 
void GL_GetNormal0 ()
 
void GL_GetActPlane ()
 
Point GL_GetViewPos ()
 
Point GL_GetCurPos ()
 
Point GL_GetConstrPos (Point *pti)
 
Point GL_GetCen ()
 
Point GL_GetViewPt (Point *pti)
 
Vector GL_GetEyeX ()
 
long GL_Get_DLind ()
 
long GL_GetActInd ()
 
double GL_get_Scale ()
 
double GL_query_ViewZ ()
 
void * GL_Print1 (int *iw, int *ih)
 
int GL_Feedback (int *, float *, int)
 
void GL_Sk2Uk (double *, double *, double *, double, double, double)
 
void GL_Uk2Sk (double *, double *, double *, double, double, double)
 
void GL_Do_Idle (int *, int *, int, int)
 
void GL_Do_Pan (int, int)
 
void GL_Do_Rot (int, int)
 
void GL_Do_Rot1 ()
 
void GL_Do_CenRot (double)
 
void GL_Do_Scale (int, int)
 
void GL_Set_Scale (double)
 
int GL_View_set (double[])
 
int GL_View_get (double[])
 
int GL_Set_Cen (Point *Ucen)
 
void GL_Do_RubberBox ()
 
void GL_Start_RubberBox ()
 
void GL_Stop_RubberX (double *, Point *)
 
void GL_Reshape (int, int)
 
void GL_Clear ()
 
void GL_Resize (int, int)
 
void GL_Rescale (double, Point *)
 
void GL_Draw_Ini (long *, int)
 
void GL_Disp_ln (Point *, Point *)
 
int GL_Disp_face (int gTyp, int ptNr, Point *pa)
 
int GL_Disp_iface (int gTyp, int iNr, int *ia, Point *pa)
 
void GL_DrawPoint (long *, int, Point *)
 
void GL_DrawLine (long *, int, Line *)
 
void GL_DrawLtab (long *ind, int attInd, Line *lna, int lNr)
 
void GL_DrawVec (long *, int, Point *, Vector *)
 
void GL_DrawPoly2D (long *, int, int, Point2[], double)
 
void GL_DrawPoly (long *, int, int, Point *)
 
void GL_DrawRSur (long *ind, int attInd, int ptAnz, Point *pa1, Point *pa2)
 
int GL_DrawStrip1 (Point *ps, Point *pa1, Point *pa2, int ptAnz)
 
int GL_DrawStrip2 (Point *pa1, Point *pa2, int ptAnz, int newS)
 
void GL_DrawFan (Point *pt1, int ptAnz, Point *pa1, int side, int newS)
 
void GL_DrawSymB (long *, int, int att, Point *)
 
void GL_DrawSymV (long *, int, int att, Point *, double)
 
void GL_DrawSymV2 (long *, int, int att, Point *, Point *, double)
 
void GL_DrawSymV3 (long *, int, int att, Point *, Vector *, double)
 
void GL_DrawTxtA (long *, int, Point *, char *)
 
void GL_DrawTxtG (long *ind, int att, GText *tx1)
 
void GL_DrawDimen (long *ind, int att, Dimen *dim1)
 
void GL_DrawDitto2 (long *ind, Point *p1, double az, char mir, Ditto *di)
 
int GL_DrawModel (long *ind, int att, ModelRef *mdr, ModelBas *mdb)
 
int GL_txt__ (int dMod, int bMod, Point *ptx, double txAng, double ay, double az, double scale, char *txt)
 
void GL_temp_Delete (long ind)
 
void GL_temp_delete ()
 
long GL_temp_GetInd ()
 
long GL_GetInd_temp ()
 
long GL_GetInd_last_temp ()
 
int GRU_teileArc (Point2 *, int *, ObjG2 *)
 
int GRU_teileArc1 (Point2 *, int, ObjG2 *)
 
int GRU_teileLin (Point2 *, int, Point2 *, Point2 *)
 
void GRU_calc_normal (Vector *, Point *, Point *, Point *)
 
void GRU_calc_normal2 (Vector *, Point2 *, Point2 *, Point2 *, double, double)
 
int GL_icons_dispTags (int iNr, char *txt, char stat)
 

Variables

int GL_pickSiz
 

Macro Definition Documentation

#define GR_MODE_DRAW   0
#define GR_MODE_SELECT   1
#define GR_MODE_FEEDBACK   2
#define GR_MODE_NORMAL   3
#define GR_MODE_PRINT1   4
#define GR_MODE_PRINT2   5
#define GR_STATE_WIRE   0
#define GR_STATE_SHADE   1
#define GR_STATE_HID1   2
#define GR_STATE_HID2   3
#define GR_STATE_HID3   4
#define GL2D_pos_move (   dx,
  dy 
)    glBitmap (0,0,0.f,0.f,(float)dx,(float)dy,NULL)

Function Documentation

void GL2D_pos_move ( int  dx,
int  dy 
)
void GL_DefineView ( int  )
void GL_DefineDisp ( int  ,
int   
)
void GL_Init__ ( int  ,
int  ,
int   
)
void GL_Init0 ( )
void GL_Init1 ( )
void GL_Init_View ( )
void GL_InitPtAtt ( int  ithick)

create DL-records DL_base_PtAtt until DL_base_font2

int GL_InitNewAtt ( int  ,
int   
)
create / change line-attribute in DL.
Input:
mode 0 = create / restore attribute-record
1 = change this attribute to hilited
2 = als dim anlegen. UNUSED
3 = als Hintergrundfarbe anlegen. UNUSED
Ind is die AttributNummer;
ein index into GR_AttTab
all attributes have a record in the displist (glNewList);
att.0 has dli=DL_base_LnAtt; last index is (DL_base_PtAtt - 1).
To activate an attribute call record (DL_base_LnAtt + attrib-nr)
void GL_InitSymb ( )
void GL_InitAFont ( )
void GL_InitGFont ( )
int GL_InitGF2 ( int  ind,
int  ianz,
char  mode[],
double  cx[],
double  cy[] 
)
void GL_InitModelSize ( double  ,
int   
)
void GL_Redraw ( )
void GL_Redraw1 ( )
void GL_Reframe ( )
void GL_Reframe1 ( )
void GL_Translate ( )
void GL_Translate1 ( )
void GL_Transl_Vert ( )
void GL_Transl_VertP ( Point )
void GL_Del0 ( long  )
void GL_Delete ( long  )
reset dispList.
remove DL-record[ind] and all following records.
void GL_GetGLMat0 ( )
void GL_GetNormal0 ( )
void GL_GetActPlane ( )
Point GL_GetViewPos ( )
compute cursorPosition in userCoords on GL_view_pln.
GL_view_pln is the displayPlane; always parallel to X-Y.
Point GL_GetCurPos ( )

compute cursorPosition in userCoords

Point GL_GetConstrPos ( Point pti)
compute intersectionpoint of pt1 along eyeVector on constructionPlane
eyeVector = GL_eyeX; constructionPlane = GL_constr_pln
returns: point in worldCoords on constructionPlane
Point GL_GetCen ( )

screencenter in userCoords (returns GL_cen) see also GL_GetViewSizU

Point GL_GetViewPt ( Point pti)
Vector GL_GetEyeX ( )
long GL_Get_DLind ( )
long GL_GetActInd ( )
double GL_get_Scale ( )
double GL_query_ViewZ ( )
void* GL_Print1 ( int *  iw,
int *  ih 
)
int GL_Feedback ( int *  ,
float *  ,
int   
)
void GL_Sk2Uk ( double *  ,
double *  ,
double *  ,
double  ,
double  ,
double   
)
void GL_Uk2Sk ( double *  ,
double *  ,
double *  ,
double  ,
double  ,
double   
)
void GL_Do_Idle ( int *  ,
int *  ,
int  ,
int   
)
void GL_Do_Pan ( int  ,
int   
)
void GL_Do_Rot ( int  ,
int   
)
void GL_Do_Rot1 ( )
void GL_Do_CenRot ( double  )
void GL_Do_Scale ( int  ,
int   
)
void GL_Set_Scale ( double  )
int GL_View_set ( double  [])
int GL_View_get ( double  [])
get viewport (10 doubles)
0,1,2 GL_eyeX
3,4,5 GL_cen
7,8,9 GL_eyeZ
GL_eyeX-Vektor: zeigt zum Auge des Betrachters;
ist im Display also immer nur ein Punkt
GL_eyeZ-Vektor: zeigt im Display ganz genau nach oben (vertikal);
ist normal auf eyeX-Vektor.
int GL_Set_Cen ( Point Ucen)
void GL_Do_RubberBox ( )
void GL_Start_RubberBox ( )
void GL_Stop_RubberX ( double *  ,
Point  
)
void GL_Reshape ( int  ,
int   
)
void GL_Clear ( )
void GL_Resize ( int  ,
int   
)
void GL_Rescale ( double  ,
Point  
)
Input:
Usiz size of window (horiz) in usercoords
Ucen position of center of window in usercoords
void GL_Draw_Ini ( long *  ,
int   
)
void GL_Disp_ln ( Point ,
Point  
)
int GL_Disp_face ( int  gTyp,
int  ptNr,
Point pa 
)
int GL_Disp_iface ( int  gTyp,
int  iNr,
int *  ia,
Point pa 
)
void GL_DrawPoint ( long *  ,
int  ,
Point  
)

attInd: 0=default; 1=hili; 2=dimmed; 3=green; 4=yellow.

void GL_DrawLine ( long *  ,
int  ,
Line  
)
draw line
Input:
iAtt see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
void GL_DrawLtab ( long *  ind,
int  attInd,
Line lna,
int  lNr 
)

GL_DrawLtab display group of lines

void GL_DrawVec ( long *  ,
int  ,
Point ,
Vector  
)
draw vector with ist correct length;
for unified length use GL_DrawSymV3 (.. SYM_ARROW)
void GL_DrawPoly2D ( long *  ,
int  ,
int  ,
Point2  [],
double   
)
void GL_DrawPoly ( long *  ,
int  ,
int  ,
Point  
)
display Polygon. Im Array GL_ptArr30. Kreise / Kreisbögen.
Input:
ind nr of dispListRecord; see DL_StoreObj or DL_SetObj
iAtt see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
void GL_DrawRSur ( long *  ind,
int  attInd,
int  ptAnz,
Point pa1,
Point pa2 
)
int GL_DrawStrip1 ( Point ps,
Point pa1,
Point pa2,
int  ptAnz 
)
int GL_DrawStrip2 ( Point pa1,
Point pa2,
int  ptAnz,
int  newS 
)
void GL_DrawFan ( Point pt1,
int  ptAnz,
Point pa1,
int  side,
int  newS 
)
void GL_DrawSymB ( long *  ,
int  ,
int  att,
Point  
)
display BITMAP-Symbol (SYM_TRI_S SYM_STAR_S ..)
Input:
ind nr of dispListRecord; see DL_StoreObj or DL_SetObj
attInd Color ATT_COL_BLACK ATT_COL_RED ATT_COL_GREEN .. (../ut/func_types.h)
symTyp type of symbol (../ut/func_types.h)
SYM_TRI_S Dreieck
SYM_STAR_S Sternderl
SYM_CIR_S Kreis klein
SYM_TRI_B Viereck
void GL_DrawSymV ( long *  ,
int  ,
int  att,
Point ,
double   
)
GL_DrawSymV display symbols in x-y-plane;
void GL_DrawSymV2 ( long *  ,
int  ,
int  att,
Point ,
Point ,
double   
)
GL_DrawSymV2 display oriented symbols in x-y-plane; eg SYM_ARROH
for 3D use ?
void GL_DrawSymV3 ( long *  ,
int  ,
int  att,
Point ,
Vector ,
double   
)
GL_DrawSymV3 draw oriented vector-symbols;
symTyp:
SYM_ARROW draw line with arrowhead with normalized (always same) length
SYM_SQUARE draw rectangle normal to vc1
SYM_PLANE draw filled rectangle normal to vc1
SYM_AXIS1 draw x,y,z.axis normal to vc1
SYM_AXIS draw x,y,z.axis with x,y-characters normal to vc1
SYM_CROSS draw cross (X) normal to vc1
SYM_CROSS1 draw symbolic scissor normal to vc1
SYM_TRIANG draw triangle normal to vc1
SYM_ARROH draw 2D-arrowhead-only in the x-y-plane
SYM_ARRO3H draw 3D-arrowhead-only along vc1
SYM_LENGTH draw line with lenght from scale; not normalized.
dli = -2L; GL_DrawSymV3 (&dli, SYM_ARROW, 12, &pt1, &vcz, 20.);
dli = -3L; GL_DrawSymV3 (&dli, SYM_SQUARE, 12, &pt1, &vcz, 1.);
void GL_DrawTxtA ( long *  ,
int  ,
Point ,
char *   
)
void GL_DrawTxtG ( long *  ind,
int  att,
GText tx1 
)
void GL_DrawDimen ( long *  ind,
int  att,
Dimen dim1 
)
void GL_DrawDitto2 ( long *  ind,
Point p1,
double  az,
char  mir,
Ditto di 
)
int GL_DrawModel ( long *  ind,
int  att,
ModelRef mdr,
ModelBas mdb 
)
int GL_txt__ ( int  dMod,
int  bMod,
Point ptx,
double  txAng,
double  ay,
double  az,
double  scale,
char *  txt 
)
draw text
dMod 0=linear X-mittig Y-unten
1=Circ.masz
2=Circ.masz
3=linear X-links Y-Mitte
4=Balloon
5=linear X-links(+2 chars) Y-unten
bMod 0=nix, 1=farbige Hintergrungflaeche
bMod wird auch aus txt via '[#' extrahiert !
ptx der Textmittelpunkt unten
txAng in Degrees
scale: AP_txdimsiz oder AP_txsiz oder explizite NoteSize.
see also GL_DrawTxtG
void GL_temp_Delete ( long  ind)
delete object in temp-area of DispList
void GL_temp_delete ( )

delete ALL objects in temp-area of DispList

long GL_temp_GetInd ( )

GL_temp_GetInd get index of last created temp-obj

long GL_GetInd_temp ( )

return next free temp-obj-index.

long GL_GetInd_last_temp ( )

return last temp-obj-index.

int GRU_teileArc ( Point2 ,
int *  ,
ObjG2  
)
int GRU_teileArc1 ( Point2 ,
int  ,
ObjG2  
)
int GRU_teileLin ( Point2 ,
int  ,
Point2 ,
Point2  
)
void GRU_calc_normal ( Vector ,
Point ,
Point ,
Point  
)
void GRU_calc_normal2 ( Vector ,
Point2 ,
Point2 ,
Point2 ,
double  ,
double   
)
int GL_icons_dispTags ( int  iNr,
char *  txt,
char  stat 
)

Variable Documentation

int GL_pickSiz