gCAD3D 2.40
ut_obj.h File Reference

Go to the source code of this file.

Functions

int UTO_get_DB (void **oxo, int *oNr, int *otyp, long dbInd)
 
int UTO_sav_ost (int *dbTyp, long *dbInd, int typ, int form, int siz, void *obj)
 
int UTO_obj_getp (void **objOut, int *oNr, ObjGX *ox1)
 
int UTO_pt_eval_par1_dbo (Point *pto, double lpar, int typ, long ind)
 
int UTO_parpt_pt_dbo (double *lpar, Point *pti, int typ, long ind)
 
int UTO_npt_Tes (int *pNr, Point **ppa, ObjGX *os)
 
void * UTO_obj_save (Memspc *memSpc, ObjGX *oxi)
 
int UTO_mem_seri (void **end, void *start, ObjGX *ox1)
 
void * UTO_save__ (Memspc *memSpc, void *objDat, int osiz)
 
int UTO_Memspc_init (Memspc *memSpc, void *objDat, int osiz)
 
int UTO_dump__ (ObjGX *xTab, char *txt,...)
 
int UTO_dump_1 (ObjGX *xTab, char *txt,...)
 
int UTO_invert (ObjGX *oxi)
 

Function Documentation

int UTO_get_DB ( void **  oxo,
int *  oNr,
int *  otyp,
long  dbInd 
)
*
* UTO_get_DB get DB-data-struct from typ, DB-index
* Returns a pointer to the data-struct.
* Does NOT resolve objRefs (Typ_Index).
* Input:
* otyp dbtyp
* dbInd DB-index
* Output:
* otyp wird bei Typ_CV auf die genaue ObjType korrigiert;
* bei Typ_SUR --> Typ_ObjGX
* oxo Pointer auf die korrekte struct - NICHT auf ObjGX !
* oNr number of structs in oxo
* RetCod 0=OK, data-struct;
* 1=OK, complexObj
* -1=Error (dbo not defined)
*
*
* otyp-in otyp-out struct Grouptype
* Typ_CVPOL Typ_CVPOL CurvPoly 0
* Typ_CVTRM Typ_CVTRM CurvCCV 1 // was ObjGX until 2014-06-04
* Typ_Note <Typ_GTXT GText 0>
* Typ_Note <Typ_ATXT AText 0>
* Typ_Note <Typ_Tag AText 0>
* Typ_VAR Typ_VAR double 0
*
*
* see also:
* DB_GetObjGX get complexObj from DB-Obj Keep Refs. Give ObjGX.
* UTO_get_DB get dataStruct from DB-Obj Keep Refs. Give pointer.
* DB_GetObjDat get dataStruct from DB-Obj Resolv Refs. Give pointer.
*
* UTO_obj_getp get dataStruct from ObjGX Resolv Refs. Give pointer.
* UTO_obj_get get dataStruct from ObjGX Resolv Refs. Give a copy.
*
int UTO_sav_ost ( int *  dbTyp,
long *  dbInd,
int  typ,
int  form,
int  siz,
void *  obj 
)
* UTO_sav_ost create DB-object & save it in Model.
*
* Output:
* dbTyp
* dbInd
* RetCod: 0=OK, -1=Err
*
* Example:
* int iTyp;
* long dbi;
* Point pa[]={{0., 0., 0.},{5., 0., 0.},{5., 2., 0.},{7., 0., 0.}};
* UTO_sav_ost (&iTyp, &dbi, Typ_CVPOL, Typ_PT, 4, (void*)pa);
*
* AP_stru_2_txt (NULL, 0, NULL, 0); // init the objNr's before UTO_sav_ost
* ACHTUNG: verwendet mem_cbuf1
*
int UTO_obj_getp ( void **  objOut,
int *  oNr,
ObjGX ox1 
)
* UTO_obj_getp get dataStruct from ObjGX
* Returns a pointer to the data-struct from ObjGX
* Referenced objects (Typ_Index) are resolved.
*
* Input:
* ox1 obj as ObjGX
* Output:
* objOut datastruct, typ = RetCode
* RetCod = typ of datastruct (form). CCV: returns Typ_ObjGX.
* -1 = Error
*
* CCV: rc=Typ_ObjGX
* Polygon: rc=Typ_CVPOL; objOut=CurvPoly
* see UTO_get_DB get dataStruct from DB-Obj Keep Refs. Give pointer.
* see DB_GetObjGX DB UTO_obj_get UTO_objx_get
*
int UTO_pt_eval_par1_dbo ( Point pto,
double  lpar,
int  typ,
long  ind 
)
* UTO_pt_eval_par1_dbo get point from 0-1-parameter (curve from typ/ind)
* ACHTUNG: lpar muss im Bereich 0-1 sein; wird fuer Curves umgerechnet !!
*
* Input:
* typ DB-typ
* ind DB-index
*
*
int UTO_parpt_pt_dbo ( double *  lpar,
Point pti,
int  typ,
long  ind 
)
* UTO_parpt_pt_dbo get parameter from point (obj from typ/ind)
* ACHTUNG: lpar muss im Bereich 0-1 sein; wird fuer Curves umgerechnet !!
*
int UTO_npt_Tes ( int *  pNr,
Point **  ppa,
ObjGX os 
)
* get table of pointers from tesselated surface os
* Input:
* pNr size of ppa
* Output:
* pNr nr of points in ppa
*
*
void* UTO_obj_save ( Memspc memSpc,
ObjGX oxi 
)
* UTO_obj_save DO NOT USE copy complexObj -> Memspc
* TODO: make a new OGX_ox_copyMem
* returns Startadress
* see also DB_store_stru
*
int UTO_mem_seri ( void **  end,
void *  start,
ObjGX ox1 
)
void* UTO_save__ ( Memspc memSpc,
void *  objDat,
int  osiz 
)
int UTO_Memspc_init ( Memspc memSpc,
void *  objDat,
int  osiz 
)
int UTO_dump__ ( ObjGX xTab,
char *  txt,
  ... 
)

dump complex-object (Typ_ObjGX)

int UTO_dump_1 ( ObjGX xTab,
char *  txt,
  ... 
)
int UTO_invert ( ObjGX oxi)
* UTO_invert Obj umdrehen
* implem.: Typ_LN Typ_CI
*