gCAD3D 2.35
ut_ox_base.h File Reference

Go to the source code of this file.

Macros

#define OGX_SET_OBJ(ox, oTyp, oForm, oSiz, oDat)
 
#define OGX_SET_OBJ_aux(ox, oTyp, oForm, oSiz, oDat, iaux)
 
#define OGX_SET_INDEX(ox, dbTyp, dbInd)
 
#define OGX_GET_INDEX(dbTyp, dbInd, ox)
 
#define OGX_SET_Float8(ox, f8typ, float8)
 
#define OGX_SET_INT(dbTyp, ii4, ox)
 
#define OGX_SET_COLOR(ox, col)
 
#define OGX_GET_INT(ox)   (long)(ox)->data
 OGX_GET_INT get index out of complexObject. More...
 

Functions

int OGX_ox_ato1 (ObjGX *oxo, int *ausTyp, double *ausTab)
 
long OGX_siz__ (ObjGX *oxi, int isolate)
 
int OGX_siz_ox (long *oSiz, void *obj1, int typ, int iNr, int isolate)
 
ObjGXOGX_oxm_copy_ox (Memspc *mSpo, ObjGX *oTab, int iNr, int isolate)
 
ObjGXOGX_oxm_copy_obj (Memspc *mSpo, void *obji, int typ, int iNr, int isolate)
 
void OGX_SET_OBJ (ObjGX *ox, int oTyp, int oForm, int oSiz, void *oDat)
 
void OGX_SET_OBJ_aux (ObjGX *ox, int typ, int form, int siz, void *dat, int aux)
 
void OGX_SET_INDEX (ObjGX *ox, int dbTyp, long dbInd)
 OGX_SET_INDEX create complexObject (ObjGX) from DB-Obj (dbTyp,dbInd) More...
 
void OGX_GET_INDEX (int *typ, long *dbi, ObjGX *ox)
 OGX_GET_INDEX get index out of complexObject. More...
 
void OGX_SET_Float8 (ObjGX *ox, int f8typ, double *float8)
 OGX_SET_Float8 create complexObject (ObjGX) from (typ, float8) More...
 
void OGX_SET_INT (int *typ, int *subTyp, ObjGX *ox)
 OGX_SET_INT create complexObject (ObjGX) from (typ, int4) More...
 
void OGX_SET_COLOR (ObjGX *ox, ColRGB *col)
 OGX_SET_INT create complexObject (ObjGX) from (typ, int4) More...
 

Macro Definition Documentation

#define OGX_SET_OBJ (   ox,
  oTyp,
  oForm,
  oSiz,
  oDat 
)
Value:
{\
(ox)->typ = (oTyp);\
(ox)->form = (oForm);\
(ox)->siz = (oSiz);\
(ox)->data = (oDat);\
(ox)->dir = 0;}
int typ
Definition: xa_tra.c:151
#define OGX_SET_OBJ_aux (   ox,
  oTyp,
  oForm,
  oSiz,
  oDat,
  iaux 
)
Value:
{\
(ox)->typ = (oTyp);\
(ox)->form = (oForm);\
(ox)->siz = (oSiz);\
(ox)->data = (oDat);\
(ox)->dir = 0;\
(ox)->aux = (iaux);}
int typ
Definition: xa_tra.c:151
#define OGX_SET_INDEX (   ox,
  dbTyp,
  dbInd 
)
Value:
{\
(ox)->typ = (dbTyp);\
(ox)->form = Typ_Index;\
(ox)->siz = 1;\
(ox)->data = (void*)(dbInd);}
int typ
Definition: xa_tra.c:151
#define Typ_Index
int or long
Definition: AP_types.h:212
#define OGX_GET_INDEX (   dbTyp,
  dbInd,
  ox 
)
Value:
{\
*(dbTyp) = (ox)->typ;\
*(dbInd) = (long)(ox)->data;}
#define OGX_SET_Float8 (   ox,
  f8typ,
  float8 
)
Value:
{\
(ox)->typ = (f8typ);\
(ox)->form = Typ_Float8;\
(ox)->siz = 1;\
(ox)->data = (void*)(float8);}
int typ
Definition: xa_tra.c:151
#define Typ_Float8
64 bit (double)
Definition: AP_types.h:233
#define OGX_SET_INT (   dbTyp,
  ii4,
  ox 
)
Value:
{\
(ox)->typ = (dbTyp);\
(ox)->form = Typ_Int4;\
(ox)->siz = 1;\
(ox)->data = (void*)(ii4);}
int typ
Definition: xa_tra.c:151
#define Typ_Int4
32 bit (int, long)
Definition: AP_types.h:231
#define OGX_SET_COLOR (   ox,
  col 
)
Value:
{\
(ox)->typ = Typ_Color;\
(ox)->form = Typ_Int4;\
(ox)->siz = 1;\
(ox)->data = (void*)(*((long*)(col)));}
int typ
Definition: xa_tra.c:151
#define Typ_Int4
32 bit (int, long)
Definition: AP_types.h:231
#define Typ_Color
ColRGB.
Definition: AP_types.h:214
#define OGX_GET_INT (   ox)    (long)(ox)->data

OGX_GET_INT get index out of complexObject.

replaces: (int)ind = (long)oxi->data; (if oxi->form == Typ_Index)

Function Documentation

int OGX_ox_ato1 ( ObjGX oxo,
int *  ausTyp,
double *  ausTab 
)
OGX_ox_ato1 complexObj from 1 atomicObj (ausTyp/ausTab)
Output:
RetCod: pointer to the complexObj inside mSp1
typical complexObj-Records:
Typ_Val Typ_Val ((double*)*value) ((double)value)
Typ_<typ> Typ_Index ((int)DB-ind)
long OGX_siz__ ( ObjGX oxi,
int  isolate 
)
int OGX_siz_ox ( long *  oSiz,
void *  obj1,
int  typ,
int  iNr,
int  isolate 
)
ObjGX* OGX_oxm_copy_ox ( Memspc mSpo,
ObjGX oTab,
int  iNr,
int  isolate 
)
copy iNr complexObjects into Memspc (serialize, no delocate)
Input:
oTab iNr complexObjects
iNr size of oTab
isolate 0=do not resolv (copy) DB-objects; 1=copy the data of DB-objects
Output:
mSpo
RetCod: NULL Error (not enough mem in mSpo)
else adress of primary struct ObjGX in mSpo
ObjGX* OGX_oxm_copy_obj ( Memspc mSpo,
void *  obji,
int  typ,
int  iNr,
int  isolate 
)
void OGX_SET_OBJ ( ObjGX ox,
int  oTyp,
int  oForm,
int  oSiz,
void *  oDat 
)

OGX_SET_OBJ create complexObject (ObjGX) from binObj (struct)

replaces: ox.typ = oTyp;
ox.form = oForm; // type of oDat
ox.siz = oSiz; // size of oDat
ox->data = (void*)oDat;
no serialize, delocate; see OGX_ox_copy..
void OGX_SET_OBJ_aux ( ObjGX ox,
int  typ,
int  form,
int  siz,
void *  dat,
int  aux 
)

OGX_SET_OBJ_aux create complexObject (ObjGX) with aux.data

aux is used with binary-meshes for the type of faces;
replaces: ox.typ = oTyp;
ox.form = oForm; // type of oDat
ox.siz = oSiz; // size of oDat
ox->data = (void*)oDat;
ox->aux = (int)aux; // eg GL_TRIANGLE_FAN
void OGX_SET_INDEX ( ObjGX ox,
int  dbTyp,
long  dbInd 
)

OGX_SET_INDEX create complexObject (ObjGX) from DB-Obj (dbTyp,dbInd)

replaces: ox.form = Typ_Index;
ox.typ = dbTyp;
ox->data = (void*)dbInd;
void OGX_GET_INDEX ( int *  typ,
long *  dbi,
ObjGX ox 
)

OGX_GET_INDEX get index out of complexObject.

replaces: (int)ind = (long)oxi->data; (if oxi->form == Typ_Index)

see also LONG_PTR

void OGX_SET_Float8 ( ObjGX ox,
int  f8typ,
double *  float8 
)

OGX_SET_Float8 create complexObject (ObjGX) from (typ, float8)

replaces: ox.form = f8typ;
ox.typ = Typ_Float8;
ox->data = *float8; // pointer to static double
void OGX_SET_INT ( int *  typ,
int *  subTyp,
ObjGX ox 
)

OGX_SET_INT create complexObject (ObjGX) from (typ, int4)

replaces: ox.form = Typ_Int4;
ox.typ = dbTyp;
ox->data = (void*)int4;
void OGX_SET_COLOR ( ObjGX ox,
ColRGB col 
)

OGX_SET_INT create complexObject (ObjGX) from (typ, int4)

replaces: ox.form = Typ_Int4;
ox.typ = dbTyp;
ox->data = (void*)int4;