The first parameter of all these functions is the identifier struct_id of the structure to be generated
The following parameters describe the geometry of the object to be generated.
e.g. : tcube (struct_id, &p1, &p2) function, where p1 and p2 are two 3D points (type Ppoint3) forming a diagonal in the parallelepiped.
All the structures generated by these PHIGURE functions have the following common architecture :
label (0)
add name to set (struct_id) /* optional */
label (0)
/* first sub-object */
label (-1)
primitive attribute functions /* optional */
label (-1)
PHIGS primitive list
/* second sub-object */
label (-2)
primitive attribute functions /* optional */
label (-2)
PHIGS primitive list
/* nth sub-object */
label (-n)
primitive attribute functions /* optional */
label (-n)
PHIGS primitive list
label (-999)
Each structure is divided into n sub-objects (n >= 1). The sub-object n° i is marked by a pair of label elements (-i). A sub-object corresponds to a logical group of primitives. All the primitive attributes specific to the sub-object i are located between the two labels (-i).
By referring to the scope attribute, any attribute specific to a sub-object i, is taken into account by the sub-objects j with j>i, if no other attribute of the same type is specified.
By default, when a PHIGURE structure-building function is called, it starts by erasing the previous structure. This avoids accumulating several layers of primitives. This may be modified by calling the tstruct_create_flag function to prevent the automatic erasing of the preceding structure, and/or the systematic insertion of the add set name element.