gCAD3D 2.35
Attributes

../../doc/gcad_doxygen/Attributes.dox

Attribute Doku

Hilite_attribute
Hide_attribute
Pick_attribute
Linetyp_attributes
Color_attributes
Texture_attributes
permanent_attributes
Analysieren: see DL_get_dla
  // Jede Aenderung der Graf. Attribute wird erst nach dem Neuzeichnen
  // der gesamten Displayliste sichtbar:
  DL_Redraw ();
 

Hilite_attribute

// hilite single Object (not ApplicationObjects)
DL_hili_on ((long)DispListIndex);
// unhilite single Object
DL_hili_off ((long)DispListIndex);
// unhilite all Objects

Hide_attribute

// change hidden/visible for single obj; ON=0 OFF=1
DL_hide__ ((long)DispListIndex, OFF);

Pick_attribute

// Set to not pickable:
DL_pick_set ((long)DispListIndex, ON);
// Abfragen ob pickable:
i1 = DL_GetPick((long)DispListIndex); // OFF = ja, ON = Nein.

Linetyp_attributes

- for lines (L) circles (C) and curves (S)
- struct Ind_Att_ln type is Typ_Ltyp
- struct Att_ln type is Typ_G_Att
- source .. ?
- Ind_Att_ln is used as INT32 for GL-functions (TODO)
Defaultwerte siehe Hauptdoku "Farben, Linientypen, Strichstärken".
// Modify or create new line-Attribute:
DL_InitAttRec ((int)AttributIndex,(int)color,(int)linetyp,(int)thick);
// colour 3 digits; red, green, blue.
// 900 = red, 090 = green, 009 = blue;
// 000 = black; 999 = white, 990 = yellow ..
// lineTyp: 0 = full-line (VollLinie); 1 = dash-dot (Strich-Punkt),
// 2 = dashed (kurz strichliert) 3 = dashed-long (lang strichliert),
// lineThick: 1-6, thickness in pixels
// Defaults see File ~/gCAD3D/cfg/ltyp.rc
// - readonly <cfgdir>/ltyp.rc
// Example: Attribut 20 = green, dash, thickness 3:
DL_InitAttRec (20, 90, 2, 3);
// use this att for line:
Line ln1={{0., 0., 0.},{10., 5., 0.}};
GR_Disp_ln (&ln1, 20);
// restore defaultRecords from file <cfgdir>/ltyp.rc

Color_attributes

- for surfaces (A) and solids (B)
- struct ColRGB type is Typ_Color
- source ../ut/ut_col.c and ../ut/ut_col.h
- ColRGB is used as INT32 for GL-functions (COL_INT32 / INT32_COL)

Texture_attributes

- DisplayList GR_ObjTab - struct DL_Att.iatt keeps ColRGB for obj
- PermanentAttribute-Table GA_ObjTab - struct ObjAtt.iatt keeps ColRGB for obj
- struct ColRGB.vtex keeps Info Color or Texture (yes if .vtex = 1)
- struct ColRGB.cr .cg .cb keeps textureRefNr (index into TexRefTab)
- List *TexRefTab - struct TexRef.ibas keeps Base-Texure (index into TexBasTab)
- List *TexBasTab - struct TexBas keeps basic texture-data.
Global Vars:
Functions:
GRU_tex_rec // find rectangle for texture in modelspace
See:
TextureReferenceList
BasicTexureList

permanent_attributes

In the Modelfile:
# example: surface A20 has color e2dc27; surf. A21 is symbolic (not shaded)
GATAB
A20 Ce2dc27
A21 S1
ENDGATAB

See also: DynamicDataArea

GA_ObjTab ist the permanent-attributes-table (../xa/xa_ga.c).
Functions:
Color:
APcol_actColTra // set active col.
GA_Col__ // modify/reset/set-new color