gCAD3D 2.40
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_GET_INT(ox)   (long)(ox)->data
 OGX_GET_INT get index out of complexObject. More...
 
#define OGX_SET_COLOR(ox, col)
 
#define _OGX_NUL   { 0, 0, NULL, 0, 0, 0 }
 OGX_GET_COLOR get pointer to Typ_Color. 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 *ival, ObjGX *ox)
 OGX_SET_INT create complexObject (ObjGX) from (typ, int4) More...
 
void OGX_SET_COLOR (ObjGX *ox, ColRGB *col)
 OGX_SET_COLOR create complexObject (ObjGX) from (typ, int4) More...
 

Variables

ObjGX OGX_NUL
 

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
long (in pointer)
Definition: AP_types.h:218
#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:240
#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:237
#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)
*
#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:237
#define Typ_Color
ColRGB.
Definition: AP_types.h:220
#define _OGX_NUL   { 0, 0, NULL, 0, 0, 0 }

OGX_GET_COLOR get pointer to Typ_Color.

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; // number of records in *data;
* ox->data = (void*)oDat; // data; structure = oForm
* 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 *  ival,
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_COLOR create complexObject (ObjGX) from (typ, int4)

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

Variable Documentation

ObjGX OGX_NUL