When a photographer wants to take a photograph in the studio he (or she) usually : selects an object (or model) from the set of available objects (or models), positions it (or them) on the stage and also positions the camera in relation to the stage.
PHIGURE scene makes a parellel between these concepts and programming, with
objects and PHIGS structures
the camera and the PHIGS view
the stage and PHIGURE scenes
A PHIGURE scene makes it possible to view several PHIGS structures according to the same view. Scene is also PHIGS structure.
A scene is defined by :
the scene identifier : this is a structure identifier
the list of identifiers of the structures to be grouped
the view chosen for visualizing the scene : this is identified by the view index
A scene is produced by calling the tscene (scene_id, &struct_id_list, view_ind) function
where scene_id is the identifier of the scene to be produced
struct_id_list of the type Pint_list (see phigs.h) is the list of structure identifiers to be grouped
view_ind is the view index to be taken into account by the scene
A scene is linked to a domain as it changes the rectangle (or parallelepiped) of the domain into a square (or a cube) with a side of 1. This is called a scene transformation and depends only on the current domain when the tscene function is called.
In fact, a local transformation matrix (set by pset_local_tran or pset_local_tran3 functions) is calculated only in function of the domain given the last time the tdomain (or tdomain3) function was called prior to calling the tscene function.
Consequently, a domain may be linked to several scenes. E.g. :
tdomain (&first_domain);
tscene (scene1, ...);
tscene (scene2, ...);
tdomain3 (&second_domain);
tscene (scene3,...);
In this example the 2 scenes with identifiers scene1 and scene2 respectively correspond to the same 2D domain, whereas the scene identifier scene3 corresponds to a 3D domain