gCAD3D 2.35
tess_su.c File Reference

Tesselate Surfaces. More...

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_msh.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_ox_base.h"
#include "../ut/ut_os.h"
#include "../ut/ut_plg.h"
#include "../ut/ut_col.h"
#include "../db/ut_DB.h"
#include "../ut/gr_types.h"
#include "../gr/tess_su.h"
#include "../xa/xa_mem.h"
#include "../xa/xa.h"
#include "../xa/xa_ga.h"

Data Structures

struct  TSU_struct1
 

Macros

#define TSU_CONT_SIZ   100
 
#define TSU_VMEM_INC   2000000
 
#define TSU_vMminSiz   500000
 
#define pTabSiz   2000
 

Functions

 typedef_MemTab (int)
 
 typedef_MemTab (Point)
 
 typedef_MemTab (Fac3)
 
 typedef_MemTab (EdgeLine)
 
double WC_ask_ModSiz ()
 
int TSU_tr_2D_3D_con (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_con (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_tor (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_tor (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_sru (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_sru (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_sph (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_sph (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_srv (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_srv (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_sbsp (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_sbsp (Point *pt3, Point *pt2)
 
int TSU_tr_2D_3D_srbsp (Point *pt2, Point *pt3)
 
int TSU_tr_3D_2D_srbsp (Point *pt3, Point *pt2)
 
int TSU_free ()
 
int TSU_dli_get ()
 
int TSU_Init (int mode, void **memSpc)
 
int TSU_tess_sTab (ObjGX **spc1, int *sTyp, long *sTab, int sNr)
 
int TSU_tessObj (ObjGX **spc1, int typ, long ind)
 
int TSU_tess_addf (ObjGX *oxi)
 
int TSU_tsu2tria__ (TypTsuSur *surTab, int *surNr, int surSiz, Triangle *triTab, int *triNr, int triSiz, ObjGX *oxi)
 
int TSU_tsu2tria_sur (TypTsuSur *surTab, int *surNr, int surSiz, Triangle *triTab, int *triNr, int triSiz, ObjGX *oxi, int *surTyp)
 
int TSU_tsu2tria_rec (Triangle *triTab, int *triNr, int triSiz, ObjGX *oxi, int *surTyp)
 
int TSU_tsu2tria_add (Triangle *triTab, int *triNr, int triSiz, Point *p1, Point *p2, Point *p3)
 
int TSU_get_mode ()
 
int TSU_get_vec (Vector *vcn, ObjGX *os)
 
int TSU_realloc__ ()
 
int TSU_stor_defCol ()
 
int TSU_store (ObjGX *gSur)
 
int TSU_DrawSurT_ (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawRCIR (ObjGX *oxi, int att, long ind)
 
int TSU_DrawSurTS (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurTRU (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurTRV (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurMsh (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurBsp (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurRBsp (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurTP (ObjGX *oxi, int att, long apt_ind)
 
int TSU_DrawSurTBSP (SurBSpl *sus, int att, long apt_ind)
 
int TSU_DrawSurTC (ObjGX *oxi, int att, long apt_ind)
 
int TSU_srv_con_2cylCon (ContTab *cTab, int *cNr)
 
double TSU_uOff ()
 
int TSU_tr_init_ (ObjGX *oxi)
 
int TSU_tr_cont_ (Point *p2Tab, int ip2Max, ContTab *cTab, int *cNr)
 
int TSU_DrawSurTBox (Point *tBox, ContTab *cTab, int cNr)
 
int TSU_box_Draw1 (int ptNr, Point *p2Tab, char dir, Vector *vc1)
 
int TSU_box_Draw2 (int cNr, ContTab *cTab, Vector *vc1)
 
int TSU_box_vec (Vector *pVec, Point *tBox)
 
int TSU_fix_ax_crx (int *ptNr, Point *pTab)
 
int TSU_test_sbsp ()
 
int TSU_test_con (ObjGX *oxi)
 
int TSU_test_tor (ObjGX *oxi)
 
int TSU_test_srv ()
 
int TSU_test_sru ()
 
int TSU_srv_tor_3 ()
 
int TSU_srv_con_0 (int pNr, Point *pTab)
 
int TSU_srv_con_inside (ContTab *cTab, int cNr)
 
int TSU_srv_con_top (Point *pTab, int pNr)
 
int TSU_srv_con_cycX2_ (ContTab *cTab, double v0)
 
int TSU_srv_con_xMid (double *dx, Point *pTab, int iNr)
 
int TSU_srv_con_mov_x (Point *pTab, int iNr, double dd)
 
int TSU_srv_con_cycX1_ (Point *pTab, int iNr)
 
int TSU_srv_con_cycX__ (Point *pTab, int iNr)
 
int TSU_sph_cyclic (Point *pTab, int iNr)
 
int TSU_bsp_con_cyclic (Point *pTab, int iNr)
 
int TSU_srv_con_cyclic (Point *pTab, int iNr)
 
int TSU_vMinMax (ContTab *cTab)
 
int TSU_srv_con_1 (ContTab *cTab)
 
int TSU_srv_tor_2 (double vAct, int iv)
 
int TSU_srv_tor_i1 (Circ *ci1)
 
int TSU_srv_tor_01 (Circ *cio, Circ *cii)
 
int TSU_srv_tor_03 (Circ *cio, Circ *cii, Point *ptc, Vector *vca)
 
int TSU_sph_pln ()
 
int TSU_sph_1 (Circ *cio, Circ *cii)
 
int TSU_DrawSurTess (long *dli, int att, ObjGX *oxi)
 

Variables

int APT_dispSOL
 
ColRGB GL_actCol
 
ColRGB GL_defCol
 
int GL_actTex
 
AP_STAT AP_stat
 
int WC_modact_ind
 
DL_AttGR_ObjTab
 
long DL_ind_act
 
int(* TSU_tr_2D_3D_pt )(Point *, Point *)
 
int(* TSU_tr_3D_2D_pt )(Point *, Point *)
 
static int TSU_typ_
 
static int TSU_form_
 
static int TSU_formTyp
 
static int TSU_dir
 
static int TSU_sStyl
 
static ObjGX TSU_ox1
 
static ObjGX TSU_ox2
 
static void * TSU_obj1
 
static void * TSU_obj2
 
static ConusTSU_con
 
static TorusTSU_tor
 
static SurBSplTSU_sbsp
 
static SurRBSplTSU_srbsp
 
static Point TSU_prx
 
static Point TSU_pint [2]
 
static int TSU_pintNr
 
static int TSU_cycX
 
static int TSU_pintAct
 
static Vector TSU_vrx
 
static Vector TSU_vn
 
static Line TSU_ln1
 
static Circ TSU_ac1
 
static Plane TSU_pln
 
static CurvBSpl TSU_bs1
 
static char TSU_objCont [OBJ_SIZ_MAX]
 
static PointTSU_grid
 
static int TSU_gridMax
 
static Mat_4x3 TSU_mat
 
static Mat_4x3 TSU_imat
 
static double TSU_dat [8]
 
static double uOff
 
static double uMin
 
static double uMax
 
static double vOff
 
static double vMin
 
static double vMax
 
static double TSU_tol2D
 
static long TSU_dli
 
int TSU_mode = 0
 
static TSU_struct1 TSU_spc1
 
static TSU_struct1 TSU_spc2
 
static TSU_struct1TSU_mSpc
 

Detailed Description

Tesselate Surfaces.

=====================================================
List_functions_start:
TSU_DrawSurT_ Hauptentry
TSU_DrawSurTRV unbegrenzte RevSur
TSU_DrawSurBsp unbegrenzte BSP-Sur
TSU_DrawSurRBsp unbegrenzte RBSP-Sur
TSU_DrawSurTC getrimmte/gelochte Flaeche
TSU_tr_init_ init transformationen ..
TSU_DrawSurTBox work aktuelle 2D-Rasterbox
TSU_DrawSurTess draw tesselated surf
List_functions_end:
=====================================================

Macro Definition Documentation

#define TSU_CONT_SIZ   100
#define TSU_VMEM_INC   2000000
#define TSU_vMminSiz   500000
#define pTabSiz   2000

Function Documentation

typedef_MemTab ( int  )
typedef_MemTab ( Point  )
typedef_MemTab ( Fac3  )
typedef_MemTab ( EdgeLine  )
double WC_ask_ModSiz ( )
int TSU_tr_2D_3D_con ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_con ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_tor ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_tor ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_sru ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_sru ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_sph ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_sph ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_srv ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_srv ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_sbsp ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_sbsp ( Point pt3,
Point pt2 
)
int TSU_tr_2D_3D_srbsp ( Point pt2,
Point pt3 
)
int TSU_tr_3D_2D_srbsp ( Point pt3,
Point pt2 
)
int TSU_free ( )
int TSU_dli_get ( )
int TSU_Init ( int  mode,
void **  memSpc 
)
int TSU_tess_sTab ( ObjGX **  spc1,
int *  sTyp,
long *  sTab,
int  sNr 
)
int TSU_tessObj ( ObjGX **  spc1,
int  typ,
long  ind 
)
tesselate (add) obj into memspc spc1
Input:
typ TYP_FuncInit start/init
Typ_SUR od Typ_SOL tesselate add to TSU_mSpc
int TSU_tess_addf ( ObjGX oxi)
int TSU_tsu2tria__ ( TypTsuSur surTab,
int *  surNr,
int  surSiz,
Triangle triTab,
int *  triNr,
int  triSiz,
ObjGX oxi 
)
int TSU_tsu2tria_sur ( TypTsuSur surTab,
int *  surNr,
int  surSiz,
Triangle triTab,
int *  triNr,
int  triSiz,
ObjGX oxi,
int *  surTyp 
)
int TSU_tsu2tria_rec ( Triangle triTab,
int *  triNr,
int  triSiz,
ObjGX oxi,
int *  surTyp 
)
int TSU_tsu2tria_add ( Triangle triTab,
int *  triNr,
int  triSiz,
Point p1,
Point p2,
Point p3 
)
int TSU_get_mode ( )
int TSU_get_vec ( Vector vcn,
ObjGX os 
)
int TSU_realloc__ ( )
int TSU_stor_defCol ( )
int TSU_store ( ObjGX gSur)
int TSU_DrawSurT_ ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawRCIR ( ObjGX oxi,
int  att,
long  ind 
)
int TSU_DrawSurTS ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurTRU ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurTRV ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurMsh ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurBsp ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurRBsp ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurTP ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_DrawSurTBSP ( SurBSpl sus,
int  att,
long  apt_ind 
)
int TSU_DrawSurTC ( ObjGX oxi,
int  att,
long  apt_ind 
)
int TSU_srv_con_2cylCon ( ContTab cTab,
int *  cNr 
)
double TSU_uOff ( )
int TSU_tr_init_ ( ObjGX oxi)
int TSU_tr_cont_ ( Point p2Tab,
int  ip2Max,
ContTab cTab,
int *  cNr 
)
int TSU_DrawSurTBox ( Point tBox,
ContTab cTab,
int  cNr 
)
int TSU_box_Draw1 ( int  ptNr,
Point p2Tab,
char  dir,
Vector vc1 
)
int TSU_box_Draw2 ( int  cNr,
ContTab cTab,
Vector vc1 
)
int TSU_box_vec ( Vector pVec,
Point tBox 
)
int TSU_fix_ax_crx ( int *  ptNr,
Point pTab 
)
int TSU_test_sbsp ( )
int TSU_test_con ( ObjGX oxi)
int TSU_test_tor ( ObjGX oxi)
int TSU_test_srv ( )
int TSU_test_sru ( )
int TSU_srv_tor_3 ( )
int TSU_srv_con_0 ( int  pNr,
Point pTab 
)
int TSU_srv_con_inside ( ContTab cTab,
int  cNr 
)
int TSU_srv_con_top ( Point pTab,
int  pNr 
)
int TSU_srv_con_cycX2_ ( ContTab cTab,
double  v0 
)
int TSU_srv_con_xMid ( double *  dx,
Point pTab,
int  iNr 
)

get medium x-val of boundary

int TSU_srv_con_mov_x ( Point pTab,
int  iNr,
double  dd 
)
int TSU_srv_con_cycX1_ ( Point pTab,
int  iNr 
)
int TSU_srv_con_cycX__ ( Point pTab,
int  iNr 
)
int TSU_sph_cyclic ( Point pTab,
int  iNr 
)
int TSU_bsp_con_cyclic ( Point pTab,
int  iNr 
)
int TSU_srv_con_cyclic ( Point pTab,
int  iNr 
)
int TSU_vMinMax ( ContTab cTab)
int TSU_srv_con_1 ( ContTab cTab)
int TSU_srv_tor_2 ( double  vAct,
int  iv 
)
int TSU_srv_tor_i1 ( Circ ci1)
int TSU_srv_tor_01 ( Circ cio,
Circ cii 
)
int TSU_srv_tor_03 ( Circ cio,
Circ cii,
Point ptc,
Vector vca 
)
int TSU_sph_pln ( )
int TSU_sph_1 ( Circ cio,
Circ cii 
)
int TSU_DrawSurTess ( long *  dli,
int  att,
ObjGX oxi 
)

Variable Documentation

int APT_dispSOL
ColRGB GL_actCol
ColRGB GL_defCol
int GL_actTex
AP_STAT AP_stat
int WC_modact_ind
DL_Att* GR_ObjTab
long DL_ind_act
int(* TSU_tr_2D_3D_pt)(Point *, Point *)
int(* TSU_tr_3D_2D_pt)(Point *, Point *)
int TSU_typ_
static
int TSU_form_
static
int TSU_formTyp
static
int TSU_dir
static
int TSU_sStyl
static
ObjGX TSU_ox1
static
ObjGX TSU_ox2
static
void* TSU_obj1
static
void * TSU_obj2
static
Conus* TSU_con
static
Torus* TSU_tor
static
SurBSpl* TSU_sbsp
static
SurRBSpl* TSU_srbsp
static
Point TSU_prx
static
Point TSU_pint[2]
static
int TSU_pintNr
static
int TSU_cycX
static
int TSU_pintAct
static
Vector TSU_vrx
static
Vector TSU_vn
static
Line TSU_ln1
static
Circ TSU_ac1
static
Plane TSU_pln
static
CurvBSpl TSU_bs1
static
char TSU_objCont[OBJ_SIZ_MAX]
static
Point* TSU_grid
static
int TSU_gridMax
static
Mat_4x3 TSU_mat
static
Mat_4x3 TSU_imat
static
double TSU_dat[8]
static
double uOff
static
double uMin
static
double uMax
static
double vOff
static
double vMin
static
double vMax
static
double TSU_tol2D
static
long TSU_dli
static
int TSU_mode = 0
TSU_struct1 TSU_spc1
static
TSU_struct1 TSU_spc2
static
TSU_struct1* TSU_mSpc
static