gCAD3D 2.35
ut_DL.h File Reference

Go to the source code of this file.

Macros

#define GR_ATT_TAB_SIZ   45
 
#define GR_DIT_TAB_SIZ   1000
 
#define DL_OBJ_IS_ACTMDL(dla)   ((INT_16)dla.modInd != -1)
 
#define DL_OBJ_IS_HIDDEN(dla)   ((dla.disp == 1)&&(dla.hili == 1))
 

Functions

void DL_Init ()
 
void DL_InitAttTab ()
 
int DL_InitAttRec (int ind, int col, int ltyp, int lthick)
 
int DL_SetObj (long *dli, int typ, long dbi, int iAtt)
 
long DL_StoreObj (int Typ, long DBInd, int AttInd)
 
int DL_SetInd (long dli)
 
long DL_SetTmpObj (int typ, long dbi)
 
long DL_get__ (DL_Att **dl)
 
void DL_DumpObjTab ()
 
int DL_Redraw ()
 
int DL_ReScale__ ()
 
int DL_GetTyp (long dli)
 
long DL_get_dbi (long dli)
 
long DL_GetTrInd (long dli)
 
unsigned long DL_get_iatt (long dli)
 
long DL_find_smObj (int typ, long DBind, long DLend, int imod)
 
long DL_find_obj (int typ, long ind, long DLend)
 
int DL_hili_on (long)
 
int DL_hili_off (long)
 
int DL_pick_set (long ind, int mode)
 
int DL_grp1_set (long ind, int mode)
 
int DL_hide_chg ()
 
void DL_hide__ (long ind, int mode)
 
void DL_Lay_act_g1 (int layNr, int mode)
 
void DL_Lay_typ_g1 (int typ, int mode)
 
void DL_Lay_col_g1 (int col, int mode)
 
void DL_Lay_ltyp_g1 (int ltyp, int mode)
 
void DL_Lay_thk_g1 (int thk, int mode)
 
int DL_Lay_mod (int layNr, int func, int mode)
 
int DL_Lay_add (int layNr)
 

Macro Definition Documentation

#define GR_ATT_TAB_SIZ   45
#define GR_DIT_TAB_SIZ   1000
#define DL_OBJ_IS_ACTMDL (   dla)    ((INT_16)dla.modInd != -1)
#define DL_OBJ_IS_HIDDEN (   dla)    ((dla.disp == 1)&&(dla.hili == 1))

Function Documentation

void DL_Init ( )
void DL_InitAttTab ( )
DL_InitAttTab load file ltyp.rc into GR_AttLnTab and create DL-record
Create line-attributes. File is ~/gCAD3D/cfg/ltyp.rc
int DL_InitAttRec ( int  ind,
int  col,
int  ltyp,
int  lthick 
)
DL_InitAttRec define a new lineattributeRecord
Input:
ind Recordnr; first=0; use as attInd in GL_DrawLine
col color 900=red, 090=green, 119=blue, 990=yellow
ltyp linetyp LTYP_.. (../ut/func_types.h)
0=full, 1=dash-dot, 2=shortDash, 3=longDash
lthick 1-6, thickness in pixels
defaultvalues from <tempDir>/cfg/ltyp.rc (../../gCAD3D/cfg/ltyp.rc)
int DL_SetObj ( long *  dli,
int  typ,
long  dbi,
int  iAtt 
)
DL_SetObj get or set disp-list-record.
Input:
dli disp-list-record#; initialize with -1L.
if (dli < 0) - create new record (DL_StoreObj)
if (dli >= 0) - use the existing record (update obj)
typ,dbi,iAtt see DL_StoreObj
Output:
dli disp-list-record# >= 0
retCod 0 DL-record did already exist
1 new DL-record created
long DL_StoreObj ( int  Typ,
long  DBInd,
int  AttInd 
)
create new or overwrite DispList-record; returns its index.
(overwrite with DL_SetInd before)
Den naechsten freien DispList-Platz belegen mit Typ, DBInd, att ....
In der (hier lokalen) Displayliste, DBInd und Att speichern.
Wird benutzt von GL zum Redraw, beim Select.
if(DL_ind_act >= 0) use this (existing) DL-record; (preset with DL_SetInd)
Dynam. Objekte, die ueberhaupt nicht in der APT-DB gespeichert werden,
erhalten als DBInd den negativen DispList-Index.
Input:
DBInd 0 definiert temp. Obj 8 (returns -8L)
-1 temp. Obj m ind. -GR_TAB_IND
AttInd ? 2 ? 5 ?
Output:
RetCod DispListIndex dli
see also:
DL_SetInd preset DL-index (to modify DL-record)
int DL_SetInd ( long  dli)
-1 = default = create new DL-Record.
if(dli >= 0): DL_StoreObj does not creat new DL-Record !! (modify object)
DL_SetInd (-1L); // to reset (after GL_fix_DL_ind )
DL_StoreObj restores to -1
long DL_SetTmpObj ( int  typ,
long  dbi 
)
long DL_get__ ( DL_Att **  dl)

DL_get__ returns DispList

void DL_DumpObjTab ( )
int DL_Redraw ( )
int DL_ReScale__ ( )
int DL_GetTyp ( long  dli)

liefert den Typ eines DB-Obj (als return-Code)

long DL_get_dbi ( long  dli)
liefert den DB-index eines DB-Obj (als return-Code)
Input: dli; alle andern Out.
long DL_GetTrInd ( long  dli)

get the refsys-nr (dbi of Plane) for DL-record <dli>

unsigned long DL_get_iatt ( long  dli)

returns iatt of DL-record

long DL_find_smObj ( int  typ,
long  DBind,
long  DLend,
int  imod 
)
get dispListIndex of (last) DB-obj from typ/dbi/subModelNr
Objekt typ=typ APTind=ind in der DL suchen.
liefert DisplayListIndex des letzen definierten Objekts
Hidden objects haben -1 !!
Input:
typ objTyp (Typ_PT ..)
DBind dataBaseIndex of obj to search
DLend last DL-Index to check; -1L = search in complete DL
retCode = DispListIndex
-1 Error; objID not found in DL
long DL_find_obj ( int  typ,
long  ind,
long  DLend 
)
get dispListIndex of (last) DB-obj from typ/dbi
Objekt typ=typ APTind=ind in der DL suchen.
liefert DisplayListIndex des letzen definierten Objekts
Hidden objects haben -1 !!
Input:
typ objTyp (Typ_PT ..)
DBind dataBaseIndex of obj to search
DLend last DL-Index to check; -1L = search in complete DL
retCode = DispListIndex
-1 Error; objID not found in DL
int DL_hili_on ( long  )
DL_hili_on set obj hilited
ind >= 0: Hili Obj.
ind = -1: gesamte Hili-Tabelle loeschen
ind = -2: das zuletzt bearb. Elem. hiliten
RetCod:
-1 hidden object; not hilited ..
No Redraw !
Ein schon vorhandenes Objekt hiliten.
ObjID merken fuer Redraw.
Hier wird zusätzlich das DISP-Bit auf OFF gesetzt,
um das Obj nicht doppelt zu zeichnen.
int DL_hili_off ( long  )
DL_hili_off reset hilited
ind >= 0: unhilite single obj
ind = -1: unhilite all hilited objects
returns nr of hilited objs
ind = -2: das zuletzt bearb. Elem. unhiliten
No Redraw !
int DL_pick_set ( long  ind,
int  mode 
)
Selektierbarkeit; ON od OFF.
Default == pickable == 1; not pickable==0.
ind=-1: modify last object of DispList
int DL_grp1_set ( long  ind,
int  mode 
)
Zugehoerigkeit zu Group 1; ON od OFF.
Default == nicht_zugehoerig == OFF == 1; zugehoerig == ON == 0.
ind -1 all objects
int DL_hide_chg ( )

DL_hide_chg change hidden/visible for all objs

void DL_hide__ ( long  ind,
int  mode 
)
DL_hide__ change hidden/visible for single obj
mode ON(0) set visible
OFF(1) set hidden
modify DL.disp, DL.hili
void DL_Lay_act_g1 ( int  layNr,
int  mode 
)

activate GroupBit1 des layer Nr. layNr

void DL_Lay_typ_g1 ( int  typ,
int  mode 
)

grp_1 fuer alle Obj, die NICHT Typ i1 haben, auf OFF.

void DL_Lay_col_g1 ( int  col,
int  mode 
)
das GroupBit1 fuer alle Obj, die NICHT Farbe i1 haben, ON setzen.
mode unused
void DL_Lay_ltyp_g1 ( int  ltyp,
int  mode 
)

grp_1 fuer alle Obj, die NICHT ltyp i1 haben, auf OFF.

void DL_Lay_thk_g1 ( int  thk,
int  mode 
)

grp_1 fuer alle Obj, die NICHT Dicke i1 haben, auf OFF.

int DL_Lay_mod ( int  layNr,
int  func,
int  mode 
)
modify layer
layNr die Nr. des zu bearbeitenden Layers; -1 = alle Layers !
func ...
mode ON oder OFF; entspr. func.
int DL_Lay_add ( int  layNr)