gCAD3D 2.40
ut_project.c File Reference

project More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../xa/xa_mem.h"
#include "../ut/ut_geo.h"
#include "../ut/ut_ox_base.h"
#include "../ut/func_types.h"


int UPRJ_def__ (int typ, void *target, int oNr, Vector *vc1)
int UPRJ_def_lim (int mode)
int UPRJ_app_pt (Point *p2, Point *p1)
int UPRJ_app_vc (Vector *v2, Vector *v1)
int UPRJ_app_ci (void *obo, Circ *c1)
int UPRJ_app_el (CurvElli *eo, CurvElli *ei)
int UPRJ_app_plg (CurvPoly *cvo, CurvPoly *cvi, Memspc *objSpc)
int UPRJ_app_bsp (CurvBSpl *cvo, CurvBSpl *cvi, Memspc *objSpc)
int UPRJ_app__ (ObjGX *oxo, int iNr, void *obji, int ityp, Memspc *objSpc)


static int prj_typ
static int prj_nr
static int prj_limStat
static void * prj_tg
static Vector prj_vc

Detailed Description


UPRJ_def__ init projection with target & projectionDirection
UPRJ_def_lim define if resulting point must be on limited obj
UPRJ_app__ apply prj to struct (nicht ObjGX)
UPRJ_app_obj apply transf. to to object (ObjGX-tree)
UPRJ_app_oTab apply transf. to ObjGX-tabl

Function Documentation

int UPRJ_def__ ( int  typ,
void *  target,
int  oNr,
Vector vc1 
* init projection with target & projectionDirection
* typ typ of projectionTarget; must be Typ_PLN
* target typ=Typ_PLN: (Plane*)
* typ=Typ_SURMSH: (int*)target[0]=dbIndSurMesh;
* target[1]=dbIndSurPtab.
* vc1 projectionVector; if NULL: normal projection
* Output:
* retCod
* see UTRA_def_...
int UPRJ_def_lim ( int  mode)
* UPRJ_def_lim define if resulting point must be on limited obj
* default=yes=limited
int UPRJ_app_pt ( Point p2,
Point p1 
* apply projection to a point.
* Input:
* prj_typ extern; type of prj_tg
* prj_tg extern; where to project
* p1 point to project onto prj_tg
* Output
* p2
* retCod 1 = OK; -1=Error
int UPRJ_app_vc ( Vector v2,
Vector v1 

apply projection to a Vector. using plane prj_tg, prj_vc.

int UPRJ_app_ci ( void *  obo,
Circ c1 
* apply projection to a Circle.
* RetCod = OutputObj is circ or ellipse
int UPRJ_app_el ( CurvElli eo,
CurvElli ei 
* Project an ellipse onto a plane, orthogonally.
int UPRJ_app_plg ( CurvPoly cvo,
CurvPoly cvi,
Memspc objSpc 
int UPRJ_app_bsp ( CurvBSpl cvo,
CurvBSpl cvi,
Memspc objSpc 

apply projection to a Polygon

int UPRJ_app__ ( ObjGX oxo,
int  iNr,
void *  obji,
int  ityp,
Memspc objSpc 
* apply projection to struct; NOT object.
* Storage:
* Normale structs werden nach objo ausgegeben;
* ObjGX-Records: ObjGX-Records werden nach objo ausgegeben; die
* zugehoerigen Daten (structs) werden in objSpc gespeichert.
* Extern Vars:
* APT_prim_seg solutionNr; 0=first.
* Input:
* ityp form of obji (eg Typ_ObjGX for surfaces)
* iNr nr of objects to transform
* objSpc get memspc for objo from objo
* Output:
* objo output-obj; data is in objSpc
* retCod 0=OK; -1=Error.

Variable Documentation

int prj_typ
int prj_nr
int prj_limStat
void* prj_tg
Vector prj_vc