Previous Next Up Title Contents Index Functions Index Top Library

SCENE DEFINITION

tscene


CALL SEQUENCE

void tscene (scene_id, struct_list, view_ind)

INPUT PARAMETERS

Pint	scene_id;
Pint_list 	*struct_list;
Pint 	view_ind;

ARGUMENTS

scene_id
Identifier of the scene to be built.
struct_list
List of identifiers of structures to be included in the scene.
view_ind
Identifier of the view used to visualize the scene.

TYPES

typedef struct {
	Pint	num_ints;
	Pint	*ints;
} Pint_list;

EFFECT

This function defines the set of structures built by PHIGURE that are to be visualized from the same viewpoint. It groups these structures in a scene designated by its identifier, scene_id.

When drawing a scene (with predraw_all_structs or ppost_struct) on an open workstation, the scene structures are drawn in the order given in the list called struct_list : the first structure drawn is ints[0], the second is ints[1], etc. The scene is in fact a PHIGS structure itself, with the identifier scene_id, referring to the set of structures whose identifier is struct_list.

The scene structure is organized as follows:

LABEL 0

the set of default attributes valid for all the primitives of the scene.

LABEL ints[0]

refers to the structure whose identifier is ints[0]

LABEL ints[1]

refers to the sructure whose identifier is ints[1]

.

.

.

LABEL ints[num_ints-1]

refer to the structure whose identifier is ints[num_ints-1]

LABEL -999

This organization makes it possible to give general graphic attributes for all the primitives of the scene, and also to give a graphic attribute that is valid only for certain structures (see the section on "Graphic attributes of structures").

Examples:

If all text primitives must use character font number -12, we could write this sequence :

If all polyline primitives from the structure ints [3] to the structure ints [num_ints-1] must use colour index number 14, we could write this sequence :

In the same way, we could indicate which scene structures should have their primitive clipped at the limits of the domain defined by tdomain or tdomain3. If we want all structures to be clipped, we would write :

If only structure ints[5] is to be clipped, we would write :


Previous Next Up Title Contents Index Functions Index Top Library