gCAD3D 2.40
ut_gr.h File Reference

Go to the source code of this file.

Macros

#define GR_gxt_strLen(txt)   strlen(txt) - UTX_cnr_chr (txt, '[')
 

Functions

void GR_Init1 ()
 
void GR_CreTxtA (long *ind, int attInd, Point *pt1, char *txt)
 
void GR_CrePoint (long *ind, int attInd, Point *pt1)
 
void GR_CreLine (long *ind, int attInd, Line *ln1)
 
void GR_CreCirc (long *ind, int attInd, Circ *ci1)
 
void GR_CreDisk (long *ind, int attInd, Point *pc, Vector *vz, double rd1, double rd2)
 
void GR_CreTriaFan (long *ind, int attInd, Point *pc, int anz, Point *pa1)
 
void GR_CrePrism (long *ind, int attInd, int anz, Point *pa1, Point *pa2)
 
void GR_CreCyl (long *ind, int attInd, Point *pt1, Point *pt2, double rd1, double rd2)
 
void GR_CreTor (long *ind, int attInd, Circ *ci1, double rd1)
 
void GR_CreTorSeg (long *ind, int attInd, Circ *ci1, Circ *ci2)
 
int GR_CreSol (long *ind, int attInd, ObjGX *db1)
 
void GR_DrawDimen (long *ind, int attInd, Dimen *dim1)
 
void GR_DrawTxtA (long *ind, int attInd, Point *pt1, char *txt)
 
void GR_DrawTxtG (long *dli, int attInd, GText *tx1, long dbi)
 
void GR_DrawPoint (long *, int, Point *)
 
void GR_DrawLine (long *ind, int attInd, Line *ln1)
 
int GR_DrawCirc (long *dli, long dbi, int attInd, Circ *ci1)
 
void GR_DrawPoly (long *ind, int attInd, int, Point *)
 
void GR_DrawDitto2 (long *ind, Point *pt, double az, char mir, Ditto *di)
 
int GR_DrawPlane (long *ind, int attInd, Plane *pl1)
 
int GR_DrawSur (ObjGX *oxi, int att, long apt_ind)
 
void GR_DrawDisk (long *ind, int attInd, Point *pc, Vector *vz, double rd1, double rd2)
 
void GR_DrawTriaFan (long *ind, int attInd, Point *pc, int anz, Point *pa1)
 
int GR_DrawTriaStrip (long *ind, int attInd, int ptUNr, int ptVNr, Point *pa, int newS)
 
void GR_DrawPrism (long *ind, int attInd, int anz, Point *pa1, Point *pa2)
 
void GR_DrawCyl (long *ind, int attInd, Point *pt1, Point *pt2, double rd1, double rd2)
 
void GR_DrawTor (long *ind, int attInd, Circ *ci1, double rd1)
 
void GR_DrawTorSeg (long *ind, int attInd, Circ *ci1, Circ *ci2)
 
void GR_DrawCvPpsp3 (long *ind, int attInd, ObjGX *cv1, double zval)
 
int GR_DrawCvBSp (long *ind, long dbi, int attInd, CurvBSpl *cv1)
 
int GR_DrawFan (Point *pt1, int ptAnz, Point *pa1, int typ, int newS)
 
int GR_DrawStrip (Point *pa1, Point *pa2, int ptAnz, int newS)
 
int GR_Draw_spu (long *ind, int att, int pNr, Point *pTab)
 
int GR_Disp_pt (Point *pt1, int typ, int att)
 
int GR_Disp_pt2 (Point2 *pt1, int typ, int att)
 
int GR_Disp_npti (int ptNr, Point *pTab, int typ, int att, int itx)
 
int GR_Disp_pTab (int ptNr, Point *pTab, int typ, int att)
 
int GR_Disp_p2Tab (int ptNr, Point2 *p2Tab, int typ, int att)
 
int GR_Disp_vc (Vector *vc1, Point *pt1, int att, int mode)
 
int GR_Disp_vc2 (Vector2 *vc1, Point2 *pt1, int att, int mode)
 
int GR_Disp_ln (Line *ln1, int att)
 
int GR_Disp_ac (Circ *ci1, int att)
 
int GR_Disp_ell (CurvElli *el1, int att)
 
int GR_Disp_pol (CurvPoly *pol, int att)
 
int GR_Disp_cv (Point *pta, int ptnr, int att)
 
int GR_Disp_cv2 (Point2 *pta, int ptnr, int att)
 
int GR_Disp_bez (CurvBez *bez, int att, Memspc *workSeg)
 
int GR_Disp_CvBSp (CurvBSpl *bspl, int att)
 
int GR_Disp_tria (Triangle *tria, int att)
 
int GR_Disp_box (Point *p1, Point *p2, int att)
 
int GR_Disp_pln (Plane *pl1, int att)
 
int GR_Disp_patch (int gTyp, int icol, int pNr, Point *pa)
 
int GR_Disp_ipatch (int gTyp, int icol, int iNr, int *ia, Point *pa)
 
int GR_Disp_fan (Point *ps, Point *pa1, Point *pa2, int pNr, int att)
 
int GR_Disp_spu (int pNr, Point *pTab, int att)
 
int GR_Disp_spu1 (int pNr, Point *pTab, int att)
 
int GR_Disp_sru (ObjGX *oxi, int att)
 
int GR_Disp_sur (ObjGX *oxi, int att)
 
int GR_Disp_sbsp (int ptUNr, int ptVNr, Point *pTab, int att)
 
double GR_gtx_ckBlockWidth (char *, double)
 
int GR_gxt_strLen (char *)
 
double GTX_chw_ (double)
 
double GTX_cw_ ()
 
double GTX_chh_ (double)
 
double GTX_chhl_ (double)
 
double GTX_chhl2 (double)
 
double GTX_scale (double)
 
double GTX_siz__ (double)
 

Macro Definition Documentation

#define GR_gxt_strLen (   txt)    strlen(txt) - UTX_cnr_chr (txt, '[')
* GR_gxt_strLen get stringlength of textnote
* ignore all controlcharacters '['
*

Function Documentation

void GR_Init1 ( )
void GR_CreTxtA ( long *  ind,
int  attInd,
Point pt1,
char *  txt 
)
* att am besten Typ_Att_Symb.
* Position links unten.
*
void GR_CrePoint ( long *  ind,
int  attInd,
Point pt1 
)
* Input:
* ind > 0: store obj in DB
* ind = 0: store dynamic obj in DB.
* ind < 0: do not store obj in DB.
* attInd: 0=normal, black; 1=red (hilited);
*
void GR_CreLine ( long *  ind,
int  attInd,
Line ln1 
)
* create DB-record, DL-record and display line
* Input:
* 0 create new dynamic DB-obj;
* < 0 do not store obj in DB
* attInd see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
*
* Output:
* ind dbi (negative for dynamic obj)
*
void GR_CreCirc ( long *  ind,
int  attInd,
Circ ci1 
)
void GR_CreDisk ( long *  ind,
int  attInd,
Point pc,
Vector vz,
double  rd1,
double  rd2 
)

Erzeugung einer Disk; rd1 = innerer Rad, rd2 = ausserer rad.

void GR_CreTriaFan ( long *  ind,
int  attInd,
Point pc,
int  anz,
Point pa1 
)

GR_CreTriaFan ein od mehrere Dreiecke mit gemeinsamem Pkt.

void GR_CrePrism ( long *  ind,
int  attInd,
int  anz,
Point pa1,
Point pa2 
)
void GR_CreCyl ( long *  ind,
int  attInd,
Point pt1,
Point pt2,
double  rd1,
double  rd2 
)
void GR_CreTor ( long *  ind,
int  attInd,
Circ ci1,
double  rd1 
)
void GR_CreTorSeg ( long *  ind,
int  attInd,
Circ ci1,
Circ ci2 
)
int GR_CreSol ( long *  ind,
int  attInd,
ObjGX db1 
)
void GR_DrawDimen ( long *  ind,
int  attInd,
Dimen dim1 
)
void GR_DrawTxtA ( long *  ind,
int  attInd,
Point pt1,
char *  txt 
)
* attInd colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
* pt1 Position bottom left.
*
void GR_DrawTxtG ( long *  dli,
int  attInd,
GText tx1,
long  dbi 
)
* attInd dzt 0
* Position links unten.
*
void GR_DrawPoint ( long *  ,
int  ,
Point  
)
* Create 3D-Point
* attInd: 0=normal, black; 1=red (hilited);
*
void GR_DrawLine ( long *  ind,
int  attInd,
Line ln1 
)
* Erzeugung einer 3D-Line
* Input:
* ind dli
* attInd see GR_Disp_ln2 (see ~/gCAD3D/cfg/ltyp.rc)
*
int GR_DrawCirc ( long *  dli,
long  dbi,
int  attInd,
Circ ci1 
)
void GR_DrawPoly ( long *  ind,
int  attInd,
int  ,
Point  
)

Erzeugung eines 3D-Polygon

void GR_DrawDitto2 ( long *  ind,
Point pt,
double  az,
char  mir,
Ditto di 
)

Erzeugung 3D-Ditto

int GR_DrawPlane ( long *  ind,
int  attInd,
Plane pl1 
)

SYM_SQUARE= normale Plane; SYM_PLANE= gelb (activ)

int GR_DrawSur ( ObjGX oxi,
int  att,
long  apt_ind 
)
void GR_DrawDisk ( long *  ind,
int  attInd,
Point pc,
Vector vz,
double  rd1,
double  rd2 
)

Erzeugung einer Disk; rd1 = innerer Rad, rd2 = ausserer rad.

void GR_DrawTriaFan ( long *  ind,
int  attInd,
Point pc,
int  anz,
Point pa1 
)

Attr f faces sind 4,5 od 6

int GR_DrawTriaStrip ( long *  ind,
int  attInd,
int  ptUNr,
int  ptVNr,
Point pa,
int  newS 
)
* used fuer unbegrenzte B-SplineSurface
* TSU_mode 0=normal darstellen; 1=speichern
* Attr f faces sind 4,5 od 6
* p1 size = ptUNr * ptVNr
* newS Typ_SURBSP
*
void GR_DrawPrism ( long *  ind,
int  attInd,
int  anz,
Point pa1,
Point pa2 
)
void GR_DrawCyl ( long *  ind,
int  attInd,
Point pt1,
Point pt2,
double  rd1,
double  rd2 
)
* Erzeugung eines Zylinders / Konus (Cyl / Cone)
* See also GL_draw_cone GL_Disp_patch GL_DrawFan
*
void GR_DrawTor ( long *  ind,
int  attInd,
Circ ci1,
double  rd1 
)
void GR_DrawTorSeg ( long *  ind,
int  attInd,
Circ ci1,
Circ ci2 
)
* ci1 ist die Hauptdrehachse, ci2 das Profil.
* Am Anfangspunkt von ci1 sitzt ci2.
* Nun am Endpunkt von ci1 auch einen ebensolchen Kreis ci3 generieren.
* Nun die ersten 2 Punkte auf ci2 und ci3 durch ein Kreispolygon parallel
* zu ci1 verbinden und als RSur ausgeben.
* Dann die naechsten 2 Punkte usw.
*
void GR_DrawCvPpsp3 ( long *  ind,
int  attInd,
ObjGX cv1,
double  zval 
)
int GR_DrawCvBSp ( long *  ind,
long  dbi,
int  attInd,
CurvBSpl cv1 
)
int GR_DrawFan ( Point pt1,
int  ptAnz,
Point pa1,
int  typ,
int  newS 
)
* typ: 0 = planarer Fan; 1 = nicht planarer Fan
* newS: 0=do not start new surface; else start new Surf with this type
*
int GR_DrawStrip ( Point pa1,
Point pa2,
int  ptAnz,
int  newS 
)
* newS: 0 = do not start new surface
* newS: 1 = start new surface
*
int GR_Draw_spu ( long *  ind,
int  att,
int  pNr,
Point pTab 
)
* display nicht gelochte planare Flaeche
* att: see GR_Disp_spu
*
int GR_Disp_pt ( Point pt1,
int  typ,
int  att 
)
* Testdisplay 3D-Point
* Input:
* typ: SYM_STAR_S (Sternderl)
* SYM_TRI_S (Dreieck)
* SYM_TRI_B (Viereck)
* att: colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
*

see also GR_Disp_pTab

int GR_Disp_pt2 ( Point2 pt1,
int  typ,
int  att 
)
* Testdisplay 2D-Point als Symbol
* typ: SYM_STAR_S (Sternderl) SYM_TRI_S (Dreieck) SYM_TRI_B (Viereck)
* att: 1=sw, 2=rot 4=bl
*
int GR_Disp_npti ( int  ptNr,
Point pTab,
int  typ,
int  att,
int  itx 
)
* Testdisplay ptNr points and point-numbers
* ptAtt: color for point-symbols; see GR_Draw_obj/Typ_SymB
* txAtt: color for point-numbers; see GR_Draw_obj/Typ_SymB
*
* draw polygon with GR_Disp_cv
*
int GR_Disp_pTab ( int  ptNr,
Point pTab,
int  typ,
int  att 
)
* Testdisplay ptNr points with bitmap-symbols (star, triangle, ..)
* att: see INF_COL_SYMB GR_Draw_obj/Typ_SymB
*
* see also:
* GR_Disp_cv draw polygon
* GR_Disp_npti display points and integers along table of points
*
int GR_Disp_p2Tab ( int  ptNr,
Point2 p2Tab,
int  typ,
int  att 
)
* Testdisplay Points als kleines 3-Eck
* typ: SYM_STAR_S (Sternderl) SYM_TRI_S (Dreieck) SYM_TRI_B (grosses Viereck)
* att: see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_vc ( Vector vc1,
Point pt1,
int  att,
int  mode 
)
* GR_Disp_vc display 3D-Vector; length true or normalized
* Input:
* pt1 position fo vector; NULL = display at center of screen
* att see INF_COL_CV
* mode 0: vector has always same lenght
* 1: vector has exact size (length)
*
* see also GR_Disp_vc2
*
int GR_Disp_vc2 ( Vector2 vc1,
Point2 pt1,
int  att,
int  mode 
)
* GR_Disp_vc2 display 2D-Vector; length true or normalized
* att: see ~/gCAD3D/cfg/ltyp.rc
* mode = 0: immer gleich lang ("normiert")
* mode = 1: genaue Groesse des Vec darstellen.
*
int GR_Disp_ln ( Line ln1,
int  att 
)

att see ~/gCAD3D/cfg/ltyp.rc

int GR_Disp_ac ( Circ ci1,
int  att 
)

att see ~/gCAD3D/cfg/ltyp.rc

int GR_Disp_ell ( CurvElli el1,
int  att 
)
* Testdisplay Ellipse
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_pol ( CurvPoly pol,
int  att 
)
* Testdisplay Polygon
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_cv ( Point pta,
int  ptnr,
int  att 
)
* Testdisplay Polygon
* att: GR_Disp_ln2 see ~/gCAD3D/cfg/ltyp.rc
* see also:
* GR_Disp_pTab display table of points with bitmap-symbols
* GR_Disp_npti display points and integers along table of points
*
int GR_Disp_cv2 ( Point2 pta,
int  ptnr,
int  att 
)
* Testdisplay 2D-Polygon
*
int GR_Disp_bez ( CurvBez bez,
int  att,
Memspc workSeg 
)
* Testdisplay Bezier-Curve
* att: 2=rot, voll, dick
*
int GR_Disp_CvBSp ( CurvBSpl bspl,
int  att 
)
* Testdisplay BSP-Curve
* att: see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_tria ( Triangle tria,
int  att 
)
* GR_Disp_tria display boundary of triangle as lines
* att color,linetyp,thickness; see INF_COL_CV
*
*
int GR_Disp_box ( Point p1,
Point p2,
int  att 
)
* GR_Disp_box disp 3D-boundingBox from 2 points
* att see ~/gCAD3D/cfg/ltyp.rc
*
* s3---7---s2
* /| /|
* 11 | 8 |
* / 10 / 4
* x--|--9---x |
* | s4---1-|--s1 s1 = Startpt of polygon1 ..
* 12 / 6 /
* | 2 | 5
* |/ |/
* x----3----x
*
*
int GR_Disp_pln ( Plane pl1,
int  att 
)
* GR_Disp_pln (&pln1, 2);
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_patch ( int  gTyp,
int  icol,
int  pNr,
Point pa 
)
int GR_Disp_ipatch ( int  gTyp,
int  icol,
int  iNr,
int *  ia,
Point pa 
)
* temp. display a set of triangles from indexed points
*
* Input:
* gTyp type of triangles in ia; eg GL_TRIANGLES; see GR_Disp_patch
* bitVal-16 set: face is planar; else not.
* iNr nr of indices in ia
* ia[iNr] indices into pa
* pa table of points
* icol colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
*
* was GR_Disp_iface
*
int GR_Disp_fan ( Point ps,
Point pa1,
Point pa2,
int  pNr,
int  att 
)
* DO NOT USE; replaced with GR_Disp_patch
* Testdisplay Dreiecksflaechen;
* att: see GR_Disp_spu
* pNr: Anzahl Punkte der Arrays pa1 und pa2.
* Minimum: 1 Dreicke; pNr=1.
*
* Beispiel: pNr=3.
* a23
* / |
* a22 /|
* / /| / |
* a21 / | / |
* / |/ |/ |
* ps--a11--a12--a13
*
int GR_Disp_spu ( int  pNr,
Point pTab,
int  att 
)
* display nicht gelochte planare Flaeche
* att: 5,7=blau, 8=gruen, 9,12=rot
* 6=hellgrau, 10=hellblau
*
int GR_Disp_spu1 ( int  pNr,
Point pTab,
int  att 
)

Display planare Contour. Jedoch mit GLT_spp__ statt GLT_spu_

int GR_Disp_sru ( ObjGX oxi,
int  att 
)
* Tesselate / Display ungetrimmte/ungelochte Ruled Flaeche
* Testdisplay Ruled-Surf
* att: 2=rot, voll, dick
*
int GR_Disp_sur ( ObjGX oxi,
int  att 
)
* Testdisplay Surface
* att: surface-color; see Col_set__ or AP_SetCol3i
* ATTENTION: is using mem501 & mem201
*
int GR_Disp_sbsp ( int  ptUNr,
int  ptVNr,
Point pTab,
int  att 
)
* Testdisplay BSP-Surf; nur Kontrollpunkte - nix dazwischen !!!
* att: 2=rot, voll, dick
*
double GR_gtx_ckBlockWidth ( char *  ,
double   
)

Breite eines Textblocks in Usercoords errechnen

int GR_gxt_strLen ( char *  )
double GTX_chw_ ( double  )
double GTX_cw_ ( )

Breite character + intercharspace

double GTX_chh_ ( double  )
* get character height
* Example:
*
double GTX_chhl_ ( double  )

height character + interlinespace

double GTX_chhl2 ( double  )

height character + halber interlinespace

double GTX_scale ( double  )
double GTX_siz__ ( double  )