Previous Next Up Title Contents General Index Functions Index Bookshelf

1.4.3. DESCRIPTION D'UNE STRUCTURE CRÉÉE PAR LA FONCTION TSCENE

Création de la scène d'identificateur scene_id, avec la vue d'index view_ind et composée des structures S3, S2 et S5.

Exemple 1:

Plimit domain;

domain.x_min = 0.0; domain.x_max = 5.0;

domain.y_min = 0.0; domain.y_max = 10.0;

tdomain (&domain);

struct_id_list.num_ints = 3;

struct_id_list.ints[0] = S3;

struct_id_list.ints[1] = S2;

struct_id_list.ints[2] = S5;

tscene (scene_id, &struct_id_list, view_ind);

La structure d'identificateur scene_id est composée des éléments suivants

plabel (0);

pset_text_font (-9);

pset_view_ind (view_ind);

pset_local_tran (matrix_2D);

pset_model_clip_vol (...);

plabel (0);

plabel (S3);

plabel (S3);

pexec_struct (S3);

plabel (S2);

plabel (S2);

pexec_struct (S2);

plabel (S5);

plabel (S5);

pexec_struct (S5);

où matrix_2D est une matrice transformant le rectangle du domaine (0, 5, 0, 10) en carré (0,1, 0,1)

Exemple 2:

Plimit3 domain;

domain.x_min = 0.0; domain.x_max = 5.0;

domain.y_min = 0.0; domain.y_max = 10.0;

domain.z_min = 5.0; domain.z_max = 20.0;

tdomain3 (&domain);

struct_id_list.num_ints = 3;

struct_id_list.ints[0] = S3;

struct_id_list.ints[1] = S2;

struct_id_list.ints[2] = S5;

tscene (scene_id, &struct_id_list, view_ind);

La structure d'identificateur scene_id est composée des éléments suivants

plabel (0);

pset_text_font (-9);

pset_view_ind (view_ind);

pset_local_tran3 (matrix_3D);

pset_model_clip_vol3 (...);

plabel (0);

plabel (S3);

plabel (S3);

pexec_struct (S3);

plabel (S2);

plabel (S2);

pexec_struct (S2);

plabel (S5);

plabel (S5);

pexec_struct (S5);

où matrix_3D est une matrice transformant le parallélépipède du domaine (0, 5, 0, 10, 5,20) en cube (0,1, 0,1, 0,1)

La partie de la CSS correspondant à la scène peut être représentée par le graphe suivant


Previous Next Up Title Contents General Index Functions Index Bookshelf