gCAD3D 2.40
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 int 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)
* DBInd=0: temp.obj; no DL-record
* DBInd>0: write GR_ObjTab[DL-index]; return DL-index
*
* Input:
* Typ type of obj; eg Typ_PT; see INF_OTYP
* DBInd 0 temp. Obj 8 (returns -8L = DLI_TMP; no DL-record).
* <0 temp. Obj m ind. -GR_TAB_IND
* >0 GR_ObjTab-index
* AttInd attribute (GR_ObjTab[].iatt)
* Global-input:
// DL_ind_act -1 = create new DL-record else overwrite existing DL-record
*
* Output:
* RetCod DL-index (GR_ObjTab) see INF_DL__
*
* see also:
* DL_SetInd preset DL-index (to modify DL-record)
*
int DL_SetInd ( long  dli)
* DL_SetInd modify (do not create new DL-Record)
* Input:
* dli -1 default = create new DL-Record. Reset.
* <-1 temporary obj (without DL-record)
* >0 DL_StoreObj does not creat new DL-Record (modify object)
*
* DL_StoreObj create or overwrite DispList-record and 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 int 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.
* Input:
* ind -1 all objects
* >=0 modify single obj; ind = dli
* mode ON = 0; set group = ON
* OFF = 1; set group = OFF
* -1 change group (ON -> OFF | OFF -> ON)
*
* grp_1 0=belongs to active Group, 1=not
*
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)