Temp-Objects

../dox/Temp-Objects.dox

Temporäre Objekte Doku

Temp-objects-in-temp-space-of-DisplList
normal-Temp-objects
Display-temp-object-functions
TempObjects are visible (they have a record in the DispList).
TempObjects are not permanent (they are not stored in the DataBase)
Input is a MemoryObject.

DB_dyn__     // save / reset pointers of dynamic DB

________________________________________________________________________________

Temp-objects-in-temp-space-of-DisplList

DispListpositions (1 - DL_base_font1-1) are reserved for
  temporary elements.
This positions can be filled directly or by using DL-index -1
  (this gives the next free temp-index).
  // dli = -1  returns next free ind in temp-area of dispList;
  // dli < -1  fixed index in temp-area of dispList;


// Use next free dispListindex:
  dli = -1;
// or get the next free index for direct use:
  dli = GL_GetInd_temp ();

// Use direkt-draw-functions:
  GL_DrawSymB
  GL_DrawSymV3
  GL_DrawPoly  usw ..

// Get the Index used by last draw-function:
  dli = GL_temp_GetInd ();
  
// delete a single object with:
  GL_temp_Delete (ind);

// delete all temp. objects with:
  GL_temp_delete ();


Example:
  Point  pt1={0,0,0};
  long dli = -1;                              // DispListIndex temp.
  GL_DrawSymB (&dli, 2, SYM_CIR_S, &pt1);     // create temp. circle
  dli = GL_temp_GetInd ();                    // get DL-index of circle
  // DL_Redraw ();                               // Redraw
  ..
  GL_temp_Delete (dli);                       // delete the circle
  ..

  // use directly fixed temporary index 2 (2-DL_base_font1):
  long dli = -2;                              // DispListIndex temp.
  GL_DrawPoly (&dli, 1, pNr, pa);

________________________________________________________________________________

normal-Temp-objects

Using the next free position in DispList.


// Use drawing-functions GR_Disp_..
  GR_Disp_pt (&p2, SYM_STAR_S, 2);            // creates temp.obj red circle
  DL_Redraw ();                               // update display
  
  
// get DispList-Index of last created obj  
  dli = GL_GetActInd ();


// delete single object
  GL_Del0 (dli);

// or delete this dl-record and all following records ..
  GL_Delete (dli);







Example:
  #include  "../gr/ut_UI.h"            // SYM..
  Point   p1={10,0,0};
  long  dli;
  GR_Disp_pt (&pt1, SYM_STAR_S, 2);           // creates temp.obj red circle
  DL_Redraw ();                               // update display
  dli = GL_GetInd_temp ();                    // get DL-index of circle
  ..
  GL_Delete (dli);                            // delete obj and all following
  ..

________________________________________________________________________________

Display-temp-object-functions

UTO_obj_Disp__
UTO_obj_Draw__
GR_Disp_dbo
GR_Draw_dbo
GR_Disp_pt,-vc,-vc2,-ln,-ac,-bsp,-pln
GR_Disp_txi         disp integer-chars
GR_Disp_box         disp 3D-boundingBox from 2 points
UI_disp_Pos         temporary display position (red circle)
UI_disp_vec1
UI_disp_tra
GL_DrawAngA                       draw angle with arrowhead
GR_Disp_axis  GL_DrawSymVX        display plane / axisSystem
UI_disp_pln_oid        hilite plane from objID (disp RX RY RZ)
UI_disp_joint UI_disp_activ     display objName as text

APT_Draw__
APT_disp_ln
DL_disp_hili
GL_disp_cone


Function-groups:

 APT_disp       without dli, store obj as temp-DB-obj, call APT_Draw
 APT_Draw       In: DB-index, dli = DL_StoreObj(DB-index), call GR_Draw

 GR_Disp        without dli, use (dli = -1), call GR_Draw
 GR_Draw        In: dli, call GL_Draw; (APT_2d_to_3d_Mat unused)

 GL_Draw        In: dli; GL-ini, GL-disp, GL-end
 GL_Disp        GL-disp (without GL-ini, GL-end.

 UI_disp        using dli=DLI_TMP; display preview

____________________________________________________________________________

Generated on Fri Apr 6 09:40:11 2012 for gCAD3D by  doxygen 1.6.3