gCAD3D 2.40
ut_gr.c File Reference

create graphic objects More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_cast.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_itmsh.h"
#include "../ut/ut_ox_base.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_os.h"
#include "../ut/ut_col.h"
#include "../db/ut_DB.h"
#include "../gr/ut_GL.h"
#include "../gr/ut_DL.h"
#include "../gr/ut_gr.h"
#include "../ut/func_types.h"
#include "../xa/xa.h"
#include "../xa/xa_mem.h"

Functions

void GR_Init1 ()
 
int GR_create_dummy (int typ, long dbi)
 
void GR_CreTxtA (long *ind, int attInd, Point *pt1, char *txt)
 
void GR_DrawTxtA (long *ind, int attInd, Point *pt1, char *txt)
 
void GR_CreTxtG (long *ind, int attInd, Point *pt1, double size, double ang, char *txt)
 
void GR_DrawDimen (long *ind, int attInd, Dimen *dim1)
 
void GR_DrawTxtG (long *dli, int attInd, GText *tx1, long dbi)
 
void GR_CrePoint (long *ind, int attInd, Point *pt1)
 
void GR_DrawPoint (long *ind, int attInd, Point *pt1)
 
void GR_CrePoly (long *ind, int attInd, int ianz, Point *ptarr)
 
void GR_DrawPoly (long *ind, int attInd, int ianz, Point *ptarr)
 
void GR_CreDitto2 (long *ind, Point *pt, double az, char mir, Ditto *di)
 
void GR_DrawDitto2 (long *ind, Point *pt, double az, char mir, Ditto *di)
 
void GR_CreLine (long *ind, int attInd, Line *ln1)
 
void GR_CreCirc (long *dbi, int attInd, Circ *ci1)
 
int GR_DrawPlane (long *ind, int attInd, Plane *pl1)
 
void GR_CreTriaFan (long *ind, int attInd, Point *pc, int anz, Point *pa1)
 
void GR_DrawTriaFan (long *ind, int attInd, Point *pc, int anz, Point *pa1)
 
void GR_CreTriaStrip (long *ind, int attInd, int ptUNr, int ptVNr, Point *pa)
 
int GR_DrawTriaStrip (long *ind, int attInd, int ptUNr, int ptVNr, Point *pa, int newS)
 
void GR_CrePrism (long *ind, int attInd, int anz, Point *pa1, Point *pa2)
 
void GR_DrawPrism (long *ind, int attInd, int anz, Point *pa1, Point *pa2)
 
int GR_CreSolSph (long *ind, int att, Sphere *sp1)
 
int GR_CreSolCon (long *ind, int att, Conus *co1)
 
int GR_CreSolBrep (long *ind, int att, int sbNr, ObjDB *sba)
 
int GR_CreSolTor (long *ind, int att, Torus *to1)
 
int GR_CreSol__ (long *ind, int attInd, ObjGX *db1)
 
void GR_CreCyl (long *ind, int attInd, Point *pt1, Point *pt2, double rd1, double rd2)
 
void GR_CreTorSeg (long *ind, int attInd, Circ *ci1, Circ *ci2)
 
void GR_DrawLine (long *ind, int attInd, Line *ln1)
 
int GR_DrawCirc (long *dli, long dbi, int attInd, Circ *cii)
 
int GR_DrawCurv (long *dli, int att, ObjGX *cv1, double zval)
 
void GR_CreDisk (long *ind, int attInd, Point *pc, Vector *vz, double rd1, double rd2)
 
void GR_DrawDisk (long *ind, int attInd, Point *pc, Vector *vz, double rd1, double rd2)
 
void GR_DrawCyl (long *ind, int attInd, Point *pt1, Point *pt2, double rd1, double rd2)
 
int GR_DrawSurPtab (long dbi, int att)
 
int GR_DrawSur (ObjGX *oxi, int att, long apt_ind)
 
int GR_DrawModel (long db_ind, int att, ModelRef *mdr)
 
void GR_DrawTorSeg (long *ind, int attInd, Circ *ci1, Circ *ci2)
 
int GR_DrawCvClot (long *ind, int att, CurvClot *cl1)
 
int GR_DrawCvCCV (long *dli, long dbi, int att, ObjGX *cv1, Memspc *tbuf1)
 
int GR_DrawCvCCV2 (long *ind, int att, ObjGX *cv1)
 
int GR_DrawCvPol (long *ind, int attInd, CurvPoly *plg1)
 
int GR_DrawCvRBSp (long *ind, int attInd, CurvRBSpl *cv1)
 
void GR_DrawCvPpsp3 (long *ind, int attInd, ObjGX *cv1, double zval)
 
void CAD_Init (int mode)
 
long CAD_sol_add (long ID1, long ID2)
 
long CAD_sol_update (long ID1)
 
int GR_chgSet (char *setName)
 
int GR_getGroup (long *stkID, char buf[])
 
int GR_getGroupID (long *elID, long *stkID, long *ind)
 
int GR_Delete (long ind)
 
int GR_tmpDisp_ln (Line *ln, int att)
 
int GR_Disp_message (int mode)
 
int GR_Disp_txi (Point *pt1, int ii, int att)
 
int GR_Disp_txi2 (Point2 *pt1, int ii, int att)
 
int GR_Disp_tx2 (Point2 *p2, char *txt, int att)
 
int GR_Disp_tx (Point *pt1, char *txt, int att)
 
int GR_Disp_pt (Point *pt1, int typ, int att)
 
int GR_Disp_pt2 (Point2 *pt1, int typ, int att)
 
int GR_Disp_4db (double x1, double x2, double y1, double y2, int att)
 
int GR_Disp_npti (int ptNr, Point *pTab, int typ, int ptAtt, int txAtt)
 
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_vc2 (Vector2 *vc1, Point2 *pt1, int att, int mode)
 
int GR_Disp_vc (Vector *vc1, Point *pt1, int att, int mode)
 
int GR_Disp_ln2 (Point2 *p1, Point2 *p2, int att)
 
int GR_Disp_ln (Line *ln1, int att)
 
int GR_Disp_ln1 (Point *p1, Point *p2, int att)
 
int GR_Disp_ac (Circ *ci1, int att)
 
int GR_Disp_ccv (CurvCCV *ccv, int att, Memspc *tbuf1)
 
int GR_Disp_triv (Triangle *tr, int att, int tNr, int ipNr)
 
int GR_Disp_cv3p2 (Point2 *p1, Point2 *p2, Point2 *p3, int att)
 
int GR_Disp_tria (Triangle *tria, int att)
 
int GR_Disp_su3p2 (Point2 *p21, Point2 *p22, Point2 *p23, int att)
 
int GR_Disp_su3pt (Point *p1, Point *p2, Point *p3, int att)
 
int GR_Disp_tris (Triangle *tria, int icol)
 
int GR_Draw_rect1 (long *dli, Point *p1, Vector *vx, double dx, Vector *vy, double dy, int att)
 
int GR_Disp_rect1 (Point *p1, Vector *vx, double dx, Vector *vy, double dy, 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_pln (Plane *pl1, int att)
 
int GR_Disp_axis (Plane *pl1, int att, int typ)
 
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_Draw_ipatch (long *dli, 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_rbez (CurvRBez *rbez, int att)
 
int GR_Disp_bez (CurvBez *bez, int att, Memspc *workSeg)
 
int GR_Disp_box (Point *p1, Point *p2, int att)
 
int GR_Disp_spu (int pNr, Point *pTab, int att)
 
int GR_Disp_spu1 (int pNr, Point *pTab, int att)
 
int GR_Draw_spu (long *ind, int att, int pNr, Point *pTab)
 
int GR_Disp_sur (ObjGX *oxi, int att)
 
int GR_Disp_sru (ObjGX *oxi, int att)
 
int GR_Disp_sbsp (int ptUNr, int ptVNr, Point *pTab, int att)
 
int GR_Disp_obj (int oTyp, void *obj, int att, int mode)
 
int GR_DrawSup (int pNr, Point *pa, int iCon)
 
int GR_CreFan (long *ind, int att, Point *pt1, int ptNr, Point *pa, int typ)
 
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_mesh (long dli, long dbi, ColRGB *col, Point *pTab, Fac3 *fTab, int fNr)
 
void GR_Disp_nfac (Point *pTab, Fac3 *fTab, int fNr, ColRGB *col)
 
int GR_Disp_CvBSp (CurvBSpl *bspl, int att)
 
int GR_Disp_rbspl (CurvRBSpl *cv1, int att)
 
int GR_DrawCvBSp (long *dli, long dbi, int att, CurvBSpl *bspl)
 
int GR_Disp_pol (CurvPoly *plg1, int att)
 
int GR_Disp_ell (CurvElli *el1, int att)
 
int GR_DrawCvEll (long *ind, int att, CurvElli *el1)
 
int GR_Disp_ox (ObjGX *ox1, int att, int mode)
 
int GR_Draw_ox (long *ind, ObjGX *ox1, int att, int mode)
 
int GR_Draw_vc (long *ind, Vector *vc1, Point *pt1, int att, int mode)
 
int GR_Draw_obj (long *dli, int form, void *obj, int oNr, int att, int mode)
 
int GR_Disp_dbo (int typ, long dbi, int att, int mode)
 
int GR_Draw_dbo (long *dli, int typ, long dbi, int att, int mode)
 
int GR_Disp_iSur (int iAtt, MemTab(IndTab)*fmt, MemTab(int)*imt, MemTab(Point)*pmt)
 
int GR_Draw_iSur (long *dli, int iAtt, MemTab(IndTab)*fmt, MemTab(int)*imt, MemTab(Point)*pmt)
 
int GR_pt_par_sel_npt (Point *pts, int *ipt, double *pa1, Point *pta, int ptNr, Point *ptAct)
 

Variables

int WC_modact_ind
 
AP_STAT AP_stat
 
ColRGB AP_defcol
 die DefaultColor des aktiven (sub)Model More...
 
int APT_3d_mode
 
int APT_dispSOL
 
int APT_dispDir
 
int APT_obj_stat
 
long AP_dli_act
 
long DL_ind_act
 
PointGLT_pta
 
long GLT_pta_SIZ
 
int TSU_mode
 
ColRGB GL_actCol
 
int GL_actTex
 
long objInd = 0
 
static int DispMode =1
 0=Aus, 1=Ein. More...
 

Detailed Description

create graphic objects

GR_Cre.. create dynamic-DB-obj, DL-record and display obj
(get dynamic DB-index: dbi = DB_Store.. ((long)-1, obj, ..);
GR_Draw.. create DL-record and display obj
Do not create DB-record
GR_Disp_.. display obj (using dynamic DL-record)
Do not create DB-record
(get dynamic DL-record: dli = DL_StoreObj (oTyp, -1L, att);)
=====================================================
List_functions_start:
GR_Disp_message switch for textoutput to console (DispMode)
GR_Disp_obj tempDisp obj from typ+struct
GR_Disp_dbo tempDisp obj from typ+dbInd
GR_Disp_ox temp. display of ObjGX-structs
GR_Disp_txi display integer at position
GR_Disp_txi2 Testdisplay integer at 2D-point
GR_Disp_tx2 text at 2D-point
GR_Disp_tx text at 3D-point
GR_Disp_pt disp 3D-point
GR_Disp_pt2 disp 2D-point
GR_Disp_4db disp 2D-Box from 4 doubles
GR_Disp_pTab disp 3D-points
GR_Disp_npti display ptNr points and point-numbers
GR_Disp_p2Tab disp 2D-points
GR_Disp_vc2 display 2D-Vector; length true or normalized
GR_Disp_vc disp 3D-vector at 3D-point; length true or normalized.
GR_Disp_ln disp 3D-line
GR_Disp_ln1 disp line between 2 points
GR_Disp_ln2 disp line between 2 2D-points
GR_Disp_rect1 disp. rectangle
GR_Disp_cv disp. polygon between points
GR_Disp_ell disp. ellipse
GR_Disp_bez display Bezier-Curve
GR_Disp_rbez display rational-bezier-curve
GR_Disp_CvBSp Testdisplay BSP-Curve
GR_Disp_rbspl testdisplay rational-bezier-curve
GR_Disp_pol disp. polygon = GR_Disp_plg
GR_Disp_ccv display ConcatenatedCurVe
GR_Disp_spu display nicht gelochte planare Flaeche
GR_Disp_spu1 display planare Contour
GR_Disp_sur display surface from OGX
GR_Disp_sru Display ungetrimmte/ungelochte Ruled Flaeche
GR_Disp_sbsp display BSP-Surf; nur Kontrollpunkte
GR_Disp_axis display axisSystem with x,y,z-characters
GR_Disp_box disp 3D-boundingBox (lines)
GR_Disp_cv3p2 Display boundary of triangle from 3 2D-points
GR_Disp_tria display boundary of triangle as lines
GR_Disp_triv display normalVector and number of triangle
GR_Disp_tris display surface of triangle
GR_Disp_su3p2 display surface of 3 2D-points
GR_Disp_su3pt display surface of 3 points
GR_Disp_fan display triangleStrip
GR_Disp_patch display Opengl-patch (type & n-points)
GR_Disp_nfac display (not indexed) Fac3-faces
GR_Disp_ipatch display a set of triangles from indexed points
GR_Disp_iSur display tesselated faces (using fmt pmt imt)
GR_Draw_obj display obj from typ+struct
GR_Draw_dbo display DB-obj (typ+dbInd)
GR_Draw_vc display 3D-Vector; length true or normalized
GR_create_dummy create a dummy DL-record; in DL and in GL.
GR_CrePoint
GR_DrawCvEll draw ellipse
GR_DrawCvBSp draw bSplineCurve
GR_Draw_subCurv draw segment of polygon or CCV.
GR_CreTxtA
GR_DrawCyl Cyl und Cone
GR_Draw_ipatch display a set of triangles from indexed points
GR_Draw_iSur display tesselated faces (using fmt pmt imt)
GR_CreCyl In: 2 Punkte 2 Radien
GR_CrePrism In: zwei Punkteketten
GR_CreDisk In: innerer Rad u ausserer rad fuer Kreisring
GR_CreTorSeg In: 2 Circs
GR_CreTriaFan In: punkte rund um eine Flaeche
GR_pt_par_sel_npt get selectionpoint and parameter on polygon
List_functions_end:
=====================================================

Function Documentation

void GR_Init1 ( )
int GR_create_dummy ( int  typ,
long  dbi 
)
void GR_CreTxtA ( long *  ind,
int  attInd,
Point pt1,
char *  txt 
)
* att am besten Typ_Att_Symb.
* Position links unten.
*
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_CreTxtG ( long *  ind,
int  attInd,
Point pt1,
double  size,
double  ang,
char *  txt 
)
* att am besten 0.
* Position links unten.
*
void GR_DrawDimen ( long *  ind,
int  attInd,
Dimen dim1 
)
void GR_DrawTxtG ( long *  dli,
int  attInd,
GText tx1,
long  dbi 
)
* attInd dzt 0
* 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_DrawPoint ( long *  ind,
int  attInd,
Point pt1 
)
* Create 3D-Point
* attInd: 0=normal, black; 1=red (hilited);
*
void GR_CrePoly ( long *  ind,
int  attInd,
int  ianz,
Point ptarr 
)
void GR_DrawPoly ( long *  ind,
int  attInd,
int  ianz,
Point ptarr 
)

Erzeugung eines 3D-Polygon

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

Erzeugung 3D-Ditto

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 *  dbi,
int  attInd,
Circ ci1 
)
int GR_DrawPlane ( long *  ind,
int  attInd,
Plane pl1 
)

SYM_SQUARE= normale Plane; SYM_PLANE= gelb (activ)

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

GR_CreTriaFan ein od mehrere Dreiecke mit gemeinsamem Pkt.

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

Attr f faces sind 4,5 od 6

void GR_CreTriaStrip ( long *  ind,
int  attInd,
int  ptUNr,
int  ptVNr,
Point pa 
)
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_CrePrism ( long *  ind,
int  attInd,
int  anz,
Point pa1,
Point pa2 
)
void GR_DrawPrism ( long *  ind,
int  attInd,
int  anz,
Point pa1,
Point pa2 
)
int GR_CreSolSph ( long *  ind,
int  att,
Sphere sp1 
)

att == ColRGB !

int GR_CreSolCon ( long *  ind,
int  att,
Conus co1 
)
int GR_CreSolBrep ( long *  ind,
int  att,
int  sbNr,
ObjDB sba 
)
int GR_CreSolTor ( long *  ind,
int  att,
Torus to1 
)
int GR_CreSol__ ( long *  ind,
int  attInd,
ObjGX db1 
)
void GR_CreCyl ( long *  ind,
int  attInd,
Point pt1,
Point pt2,
double  rd1,
double  rd2 
)
void GR_CreTorSeg ( long *  ind,
int  attInd,
Circ ci1,
Circ ci2 
)
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 cii 
)
int GR_DrawCurv ( long *  dli,
int  att,
ObjGX cv1,
double  zval 
)
* att: see ~/gCAD3D/cfg/ltyp.rc
* see APT_DrawCurv GR_Draw_dbo UTO_obj_Draw__
*
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_DrawDisk ( long *  ind,
int  attInd,
Point pc,
Vector vz,
double  rd1,
double  rd2 
)

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

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
*
int GR_DrawSurPtab ( long  dbi,
int  att 
)
int GR_DrawSur ( ObjGX oxi,
int  att,
long  apt_ind 
)
int GR_DrawModel ( long  db_ind,
int  att,
ModelRef mdr 
)
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.
*
int GR_DrawCvClot ( long *  ind,
int  att,
CurvClot cl1 
)
int GR_DrawCvCCV ( long *  dli,
long  dbi,
int  att,
ObjGX cv1,
Memspc tbuf1 
)
int GR_DrawCvCCV2 ( long *  ind,
int  att,
ObjGX cv1 
)

NOT UP TO DATE: may have only LN2 & AC2

int GR_DrawCvPol ( long *  ind,
int  attInd,
CurvPoly plg1 
)
int GR_DrawCvRBSp ( long *  ind,
int  attInd,
CurvRBSpl cv1 
)
* GR_DrawCvRBSp display rational-Bspline-curve
* att see ~/gCAD3D/cfg/ltyp.rc
*
void GR_DrawCvPpsp3 ( long *  ind,
int  attInd,
ObjGX cv1,
double  zval 
)
void CAD_Init ( int  mode)
long CAD_sol_add ( long  ID1,
long  ID2 
)
long CAD_sol_update ( long  ID1)
int GR_chgSet ( char *  setName)
int GR_getGroup ( long *  stkID,
char  buf[] 
)
int GR_getGroupID ( long *  elID,
long *  stkID,
long *  ind 
)
int GR_Delete ( long  ind)
int GR_tmpDisp_ln ( Line ln,
int  att 
)
int GR_Disp_message ( int  mode)
* Display messages with GR_Disp_xxx or not.
* 0=OFF=Aus, 1=ON=Ein.
*
int GR_Disp_txi ( Point pt1,
int  ii,
int  att 
)
* GR_Disp_txi display integer at position
* att colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
*
*
int GR_Disp_txi2 ( Point2 pt1,
int  ii,
int  att 
)
* GR_Disp_txi2 Testdisplay integer at 2D-point
* att: see GR_Disp_tx
*
int GR_Disp_tx2 ( Point2 p2,
char *  txt,
int  att 
)
* Testdisplay Text
* att: see GR_Disp_tx
*
int GR_Disp_tx ( Point pt1,
char *  txt,
int  att 
)
* Testdisplay Text
* att colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
*
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_4db ( double  x1,
double  x2,
double  y1,
double  y2,
int  att 
)
* make 2D-Box from 4 doubles
*
int GR_Disp_npti ( int  ptNr,
Point pTab,
int  typ,
int  ptAtt,
int  txAtt 
)
* 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_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_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_ln2 ( Point2 p1,
Point2 p2,
int  att 
)
* att: linetype; see INF_COL_CV
* att is an index to a linetyp in file ~/gCAD3D/cfg/ltyp.rc.
* linetyp has color, pattern thickness.
*
int GR_Disp_ln ( Line ln1,
int  att 
)

att see ~/gCAD3D/cfg/ltyp.rc

int GR_Disp_ln1 ( Point p1,
Point p2,
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_ccv ( CurvCCV ccv,
int  att,
Memspc tbuf1 
)
* Testdisplay ConcatenatedCurVe
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_triv ( Triangle tr,
int  att,
int  tNr,
int  ipNr 
)
* display Triangle-Normalvektor & number of triangle
* att colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
* color,linetyp,thickness; see INF_COL_CV
* tNr Display Integer in gravity-centerPoint if (tNr >= 0; -1 = none)
* ipNr 1 = display pointNumbers (0/1/2); -1=not
*
*
int GR_Disp_cv3p2 ( Point2 p1,
Point2 p2,
Point2 p3,
int  att 
)
* GR_Disp_cv3p2 Display boundary of triangle from 3 2D-points
*
*
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_su3p2 ( Point2 p21,
Point2 p22,
Point2 p23,
int  att 
)
* GR_Disp_su3p2 disp. surface of 3 2D-points
* att: see GR_Disp_spu
*
int GR_Disp_su3pt ( Point p1,
Point p2,
Point p3,
int  att 
)
* GR_Disp_su3pt disp. surface of 3 points
* att: see GR_Disp_spu
*
int GR_Disp_tris ( Triangle tria,
int  icol 
)
* display Surface of triangle
* icol colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
*
*
int GR_Draw_rect1 ( long *  dli,
Point p1,
Vector vx,
double  dx,
Vector vy,
double  dy,
int  att 
)
int GR_Disp_rect1 ( Point p1,
Vector vx,
double  dx,
Vector vy,
double  dy,
int  att 
)
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_pln ( Plane pl1,
int  att 
)
* GR_Disp_pln (&pln1, 2);
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_axis ( Plane pl1,
int  att,
int  typ 
)
* display axisSystem with x,y,z-characters
* typ: 1=Plane; 2=Axis; 4=Plane+Axis+Chars
* GR_Disp_axis (&pln1, 2);
* att see ~/gCAD3D/cfg/ltyp.rc
* see APT_disp_SymV1 (SYM_AXIS, 1, &pln1.po, 1.);
*
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_Draw_ipatch ( long *  dli,
int  gTyp,
int  icol,
int  iNr,
int *  ia,
Point pa 
)
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_rbez ( CurvRBez rbez,
int  att 
)
* Testdisplay rational-bezier-curve via rational-B-spline
* att: see GR_Draw_obj
*
int GR_Disp_bez ( CurvBez bez,
int  att,
Memspc workSeg 
)
* Testdisplay Bezier-Curve
* att: 2=rot, voll, dick
*
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_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_Draw_spu ( long *  ind,
int  att,
int  pNr,
Point pTab 
)
* display nicht gelochte planare Flaeche
* att: see GR_Disp_spu
*
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_sru ( ObjGX oxi,
int  att 
)
* Tesselate / Display ungetrimmte/ungelochte Ruled Flaeche
* Testdisplay Ruled-Surf
* att: 2=rot, voll, dick
*
int GR_Disp_sbsp ( int  ptUNr,
int  ptVNr,
Point pTab,
int  att 
)
* Testdisplay BSP-Surf; nur Kontrollpunkte - nix dazwischen !!!
* att: 2=rot, voll, dick
*
int GR_Disp_obj ( int  oTyp,
void *  obj,
int  att,
int  mode 
)
* GR_Disp_obj tempDisp obj from typ+struct
* Input:
* oTyp type of sObj; eg. Typ_PT see GR_Draw_obj
* obj data, struct; eg. (Point*)
* att,mode see GR_Draw_obj
*
* see also:
* Vectors: GR_Disp_vc
* Text: GR_Disp_tx
*
int GR_DrawSup ( int  pNr,
Point pa,
int  iCon 
)
* draw planare surface
* Input:
* iCon 1=Konvex; -1=Konkav
*
int GR_CreFan ( long *  ind,
int  att,
Point pt1,
int  ptNr,
Point pa,
int  typ 
)
* typ: 0 = planarer Fan; 1 = nicht planarer Fan
* do always start a new surface.
*
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_mesh ( long  dli,
long  dbi,
ColRGB col,
Point pTab,
Fac3 fTab,
int  fNr 
)
void GR_Disp_nfac ( Point pTab,
Fac3 fTab,
int  fNr,
ColRGB col 
)
* GR_Disp_nfac display (not indexed) Fac3-faces
* newS: 0 = do not start new surface
* newS: 1 = start new surface
*
int GR_Disp_CvBSp ( CurvBSpl bspl,
int  att 
)
* Testdisplay BSP-Curve
* att: see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_rbspl ( CurvRBSpl cv1,
int  att 
)
* GR_Disp_rbspl testdisplay rational-Bspline-curve
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_DrawCvBSp ( long *  dli,
long  dbi,
int  att,
CurvBSpl bspl 
)
int GR_Disp_pol ( CurvPoly plg1,
int  att 
)
* Testdisplay Polygon
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_Disp_ell ( CurvElli el1,
int  att 
)
* Testdisplay Ellipse
* att see ~/gCAD3D/cfg/ltyp.rc
*
int GR_DrawCvEll ( long *  ind,
int  att,
CurvElli el1 
)
int GR_Disp_ox ( ObjGX ox1,
int  att,
int  mode 
)
* Input:
* ox1
* att,mode see GR_Draw_obj
*
*
int GR_Draw_ox ( long *  ind,
ObjGX ox1,
int  att,
int  mode 
)
* Input:
* ind DispListIndex; get it from DL_StoreObj
* att points: 0=default; 1=hili; 2=dimmed; 3=green; 4=yellow.
* mode points: unused
* ox1
*
*
int GR_Draw_vc ( long *  ind,
Vector vc1,
Point pt1,
int  att,
int  mode 
)
* GR_Draw_vc display 3D-Vector; length true or normalized
* Input:
* pt1 position fo vector; NULL = display at center of screen
* att 0,1=sw, 2=strichliert, 3=strichPunkt 5=gelb 7=blau 8=gründick * 9=rot dick 11=sw dick 12=rot dick strichl. * mode 0: vector has always same lenght * 1: vector has exact size (length) * dick
* 9=rot dick 11=sw dick 12=rot dick strichl.
* mode 0: vector has always same lenght
* 1: vector has exact size (length)
*
int GR_Draw_obj ( long *  dli,
int  form,
void *  obj,
int  oNr,
int  att,
int  mode 
)
* Input:
* dli DispListIndex; get it from DL_StoreObj
* form,obj obj to display;
* oNr nr of objects of type <typ> in obj
* att Typ_PT: see INF_COL_PT
* Typ_SymB: colorIndex; eg ATT_COL_RED; see INF_COL_SYMB
* mode Typ_PT|Typ_CI|Typ_CV*: unused;
* Typ_PLN: 1=Plane; 2=Axis; 4=Axis+Chars; 5=Plane+Axis;
*
* Vectors: GR_Disp_vc
* Text: GR_Disp_tx
*
*
int GR_Disp_dbo ( int  typ,
long  dbi,
int  att,
int  mode 
)
int GR_Draw_dbo ( long *  dli,
int  typ,
long  dbi,
int  att,
int  mode 
)
int GR_Disp_iSur ( int  iAtt,
MemTab(IndTab)*  fmt,
MemTab(int)*  imt,
MemTab(Point)*  pmt 
)
int GR_Draw_iSur ( long *  dli,
int  iAtt,
MemTab(IndTab)*  fmt,
MemTab(int)*  imt,
MemTab(Point)*  pmt 
)
int GR_pt_par_sel_npt ( Point pts,
int *  ipt,
double *  pa1,
Point pta,
int  ptNr,
Point ptAct 
)

Variable Documentation

int WC_modact_ind
AP_STAT AP_stat
ColRGB AP_defcol

die DefaultColor des aktiven (sub)Model

int APT_3d_mode
int APT_dispSOL
int APT_dispDir
int APT_obj_stat
long AP_dli_act
long DL_ind_act
Point* GLT_pta
long GLT_pta_SIZ
int TSU_mode
ColRGB GL_actCol
int GL_actTex
long objInd = 0
int DispMode =1
static

0=Aus, 1=Ein.