—
— Jan & Uwe R. Zimmer, Australia, July 2011
—
with GL, GL.Materials, GLOBE_3D.Math;
package body Arrow_P is
— Pretty output: FALSE
use GL, GL.Materials, GLOBE_3D, GLOBE_3D.Math;
— begin Separator # 1
— VRML: [# triangle mesh
— ]
matos_1 : constant Material_type := (
ambient => (0.0, 0.0, 0.0, 1.0),
specular => (0.0, 0.0, 0.0, 1.0),
diffuse => (1.0, 1.0, 1.0, 1.0),
emission => (0.0, 0.0, 0.0, 1.0),
shininess => 128.0
);
coord_1 : constant Point_3D_array :=
((3.0, 5.0, -3.0), — VRML: [# coord point 0
— ]
(-2.142857, 5.0, -2.142857), (-1.285714, 5.0, -2.142857), (-0.428571, 5.0, -2.142857), (0.428571, 5.0, -2.142857),
(1.285714, 5.0, -2.142857), (2.142857, 5.0, -2.142857), (-2.142857, 5.0, -1.285714), (-1.285714, 5.0, -1.285714), (-0.428571, 5.0, -1.285714),
(0.428571, 5.0, -1.285714), (1.285714, 5.0, -1.285714), (2.142857, 5.0, -1.285714), (-2.142857, 5.0, -0.428571), (-1.285714, 5.0, -0.428571),
(1.285714, 5.0, -0.428571), (2.142857, 5.0, -0.428571), (-2.142857, 5.0, 0.428571), (-1.285714, 5.0, 0.428571), (1.285714, 5.0, 0.428571),
(2.142857, 5.0, 0.428571), (-2.142857, 5.0, 1.285714), (-1.285714, 5.0, 1.285714), (-0.428571, 5.0, 1.285714), (0.428571, 5.0, 1.285714),
(1.285714, 5.0, 1.285714), — VRML: [# coord point 25
— ]
(2.142857, 5.0, 1.285714), (-2.142857, 5.0, 2.142857), (-1.285714, 5.0, 2.142857), (-0.428571, 5.0, 2.142857),
(0.428571, 5.0, 2.142857), (1.285714, 5.0, 2.142857), (2.142857, 5.0, 2.142857), (-3.0, 5.0, -3.0), (-3.0, 5.0, -2.4),
(-3.0, 5.0, -1.8), (-3.0, 5.0, -1.2), (-3.0, 5.0, -0.6), (-3.0, 5.0, 0.0), (-3.0, 5.0, 0.6),
(-3.0, 5.0, 1.2), (-3.0, 5.0, 1.8), (-3.0, 5.0, 2.4), (3.0, 5.0, 3.0), (3.0, 5.0, 2.4),
(3.0, 5.0, 1.8), (3.0, 5.0, 1.2), (3.0, 5.0, 0.6), (3.0, 5.0, 0.0), (3.0, 5.0, -0.6),
(3.0, 5.0, -1.2), — VRML: [# coord point 50
— ]
(3.0, 5.0, -1.8), (3.0, 5.0, -2.4), (2.4, 5.0, -3.0), (1.8, 5.0, -3.0),
(1.2, 5.0, -3.0), (0.6, 5.0, -3.0), (0.0, 5.0, -3.0), (-0.6, 5.0, -3.0), (-1.2, 5.0, -3.0),
(-1.8, 5.0, -3.0), (-2.4, 5.0, -3.0), (-3.0, 5.0, 3.0), (-2.4, 5.0, 3.0), (-1.8, 5.0, 3.0),
(-1.2, 5.0, 3.0), (-0.6, 5.0, 3.0), (0.0, 5.0, 3.0), (0.6, 5.0, 3.0), (1.2, 5.0, 3.0),
(1.8, 5.0, 3.0), (2.4, 5.0, 3.0), (1.0, 5.0, 1.0), (0.5, 5.0, 1.0), (-0.0, 5.0, 1.0),
(-0.5, 5.0, 1.0), — VRML: [# coord point 75
— ]
(-1.0, 5.0, 1.0), (1.0, 5.0, -1.0), (1.0, 5.0, -0.5), (1.0, 5.0, -0.0),
(1.0, 5.0, 0.5), (-1.0, 5.0, -1.0), (-0.5, 5.0, -1.0), (-0.0, 5.0, -1.0), (0.5, 5.0, -1.0),
(-1.0, 5.0, 0.5), (-1.0, 5.0, 0.0), (-1.0, 5.0, -0.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(-3.0, 5.0, -3.0), (-3.0, 5.0, 3.0), (-1.5, 2.5, -1.5), (-3.0, 5.0, -2.4), (-3.0, 5.0, -1.8),
(-3.0, 5.0, -1.2), (-3.0, 5.0, -0.6), (-3.0, 5.0, 0.0), (-3.0, 5.0, 0.6), (-3.0, 5.0, 1.2),
(-3.0, 5.0, 1.8), — VRML: [# coord point 100
— ]
(-3.0, 5.0, 2.4), (-1.5, 2.5, 1.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(3.0, 5.0, -3.0), (3.0, 5.0, 3.0), (1.5, 2.5, -1.5), (3.0, 5.0, -2.4), (3.0, 5.0, -1.8),
(3.0, 5.0, -1.2), (3.0, 5.0, -0.6), (3.0, 5.0, 0.0), (3.0, 5.0, 0.6), (3.0, 5.0, 1.2),
(3.0, 5.0, 1.8), (3.0, 5.0, 2.4), (1.5, 2.5, 1.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(1.5, 2.5, -1.5), (-3.0, 5.0, -3.0), (3.0, 5.0, -3.0), (-1.5, 2.5, -1.5), (-2.4, 5.0, -3.0),
(-1.8, 5.0, -3.0), — VRML: [# coord point 125
— ]
(-1.2, 5.0, -3.0), (-0.6, 5.0, -3.0), (0.0, 5.0, -3.0), (0.6, 5.0, -3.0),
(1.2, 5.0, -3.0), (1.8, 5.0, -3.0), (2.4, 5.0, -3.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(-3.0, 5.0, 3.0), (3.0, 5.0, 3.0), (-1.5, 2.5, 1.5), (1.5, 2.5, 1.5), (-2.4, 5.0, 3.0),
(-1.8, 5.0, 3.0), (-1.2, 5.0, 3.0), (-0.6, 5.0, 3.0), (0.0, 5.0, 3.0), (0.6, 5.0, 3.0),
(1.2, 5.0, 3.0), (1.8, 5.0, 3.0), (2.4, 5.0, 3.0), (-1.0, 9.0, 1.0), (-1.0, 9.0, -1.0),
(1.0, 9.0, 1.0), — VRML: [# coord point 150
— ]
(1.0, 9.0, -1.0), (-1.0, 5.0, 1.0), (-1.0, 9.0, 1.0), (1.0, 9.0, 1.0),
(-0.5, 5.0, 1.0), (-0.0, 5.0, 1.0), (0.5, 5.0, 1.0), (1.0, 5.0, 1.0), (1.0, 9.0, 1.0),
(1.0, 5.0, -1.0), (1.0, 9.0, -1.0), (1.0, 5.0, 1.0), (1.0, 5.0, 0.5), (1.0, 5.0, -0.0),
(1.0, 5.0, -0.5), (1.0, 9.0, -1.0), (-1.0, 5.0, -1.0), (-1.0, 9.0, -1.0), (1.0, 5.0, -1.0),
(0.5, 5.0, -1.0), (-0.0, 5.0, -1.0), (-0.5, 5.0, -1.0), (-1.0, 5.0, -1.0), (-1.0, 9.0, -1.0),
(-1.0, 9.0, 1.0), — VRML: [# coord point 175
— ]
(-1.0, 5.0, -0.5), (-1.0, 5.0, 0.0), (-1.0, 5.0, 0.5), (-1.0, 5.0, 1.0) — 180
);
— VRML: [# 180 vertices
— ]
— begin Separator # 2
— VRML: [#triangle mesh
— ]
idx_2 : constant Idx_4_array_array :=
((9, 3, 2, 0), — VRML: [# triangle 0
— ]
(9, 2, 8, 0), (10, 4, 3, 0), (10, 3, 9, 0), (11, 5, 4, 0), (11, 4, 10, 0), (12, 6, 5, 0), (12, 5, 11, 0),
(13, 7, 6, 0), (13, 6, 12, 0), (15, 9, 8, 0), (15, 8, 14, 0), (17, 13, 12, 0), (17, 12, 16, 0), (19, 15, 14, 0), (19, 14, 18, 0),
(21, 17, 16, 0), (21, 16, 20, 0), (23, 19, 18, 0), (23, 18, 22, 0), (27, 21, 20, 0), (27, 20, 26, 0), (29, 23, 22, 0), (29, 22, 28, 0),
(30, 24, 23, 0), (30, 23, 29, 0), — VRML: [# triangle 25
— ]
(31, 25, 24, 0), (31, 24, 30, 0), (32, 26, 25, 0), (32, 25, 31, 0), (33, 27, 26, 0), (33, 26, 32, 0),
(35, 62, 34, 0), (2, 35, 36, 0), (62, 35, 2, 0), (61, 62, 2, 0), (3, 60, 61, 0), (3, 59, 60, 0), (58, 59, 4, 0), (3, 4, 59, 0),
(4, 5, 58, 0), (3, 61, 2, 0), (36, 8, 2, 0), (8, 38, 14, 0), (39, 14, 38, 0), (37, 38, 8, 0), (37, 8, 36, 0), (84, 10, 83, 0),
(82, 83, 10, 0), (88, 82, 15, 0), (9, 15, 82, 0), — VRML: [# triangle 50
— ]
(82, 10, 9, 0), (87, 88, 15, 0), (10, 84, 11, 0), (6, 56, 57, 0), (57, 5, 6, 0),
(5, 57, 58, 0), (55, 56, 6, 0), (7, 54, 55, 0), (53, 1, 54, 0), (52, 53, 7, 0), (54, 7, 53, 0), (7, 13, 52, 0), (7, 55, 6, 0),
(78, 16, 12, 0), (78, 12, 11, 0), (79, 16, 78, 0), (78, 11, 85, 0), (80, 16, 79, 0), (51, 13, 50, 0), (17, 50, 13, 0), (52, 13, 51, 0),
(21, 49, 17, 0), (50, 17, 49, 0), (80, 20, 16, 0), (85, 11, 84, 0), — VRML: [# triangle 75
— ]
(40, 18, 39, 0), (22, 40, 41, 0), (42, 22, 41, 0), (18, 40, 22, 0),
(86, 87, 19, 0), (19, 87, 15, 0), (77, 86, 19, 0), (77, 24, 76, 0), (19, 23, 77, 0), (23, 24, 77, 0), (39, 18, 14, 0), (43, 28, 42, 0),
(64, 43, 63, 0), (28, 43, 64, 0), (65, 28, 64, 0), (67, 30, 29, 0), (29, 65, 66, 0), (29, 66, 67, 0), (65, 29, 28, 0), (68, 30, 67, 0),
(42, 28, 22, 0), (75, 76, 24, 0), (20, 81, 73, 0), (25, 74, 75, 0), (25, 75, 24, 0), — VRML: [# triangle 100
— ]
(73, 74, 25, 0), (26, 73, 25, 0), (48, 21, 27, 0),
(49, 21, 48, 0), (47, 48, 27, 0), (46, 47, 27, 0), (26, 20, 73, 0), (81, 20, 80, 0), (69, 32, 31, 0), (31, 68, 69, 0), (32, 69, 70, 0),
(71, 32, 70, 0), (45, 46, 33, 0), (33, 46, 27, 0), (72, 45, 33, 0), (33, 71, 72, 0), (45, 72, 44, 0), (71, 33, 32, 0), (31, 30, 68, 0),
(94, 91, 93, 0), (103, 93, 90, 0), (103, 98, 93, 0), (93, 95, 94, 0), (95, 93, 96, 0), (93, 97, 96, 0), — VRML: [# triangle 125
— ]
(103, 99, 98, 0), (93, 98, 97, 0),
(103, 101, 100, 0), (103, 92, 102, 0), (103, 102, 101, 0), (103, 100, 99, 0), (109, 108, 106, 0), (118, 105, 108, 0), (118, 108, 113, 0), (108, 109, 110, 0),
(110, 111, 108, 0), (108, 111, 112, 0), (118, 113, 114, 0), (108, 112, 113, 0), (118, 115, 116, 0), (118, 117, 107, 0), (118, 116, 117, 0), (118, 114, 115, 0),
(125, 124, 122, 0), (121, 120, 124, 0), (121, 124, 129, 0), (124, 125, 126, 0), (126, 127, 124, 0), (124, 127, 128, 0), (121, 129, 130, 0), — VRML: [# triangle 150
— ]
(124, 128, 129, 0),
(121, 131, 132, 0), (121, 133, 123, 0), (121, 132, 133, 0), (121, 130, 131, 0), (139, 138, 134, 0), (140, 136, 138, 0), (139, 144, 138, 0), (138, 141, 140, 0),
(141, 138, 142, 0), (138, 143, 142, 0), (139, 145, 144, 0), (138, 144, 143, 0), (139, 147, 146, 0), (139, 137, 148, 0), (139, 148, 147, 0), (139, 146, 145, 0),
(151, 150, 149, 0), (150, 151, 152, 0), (154, 153, 156, 0), (157, 154, 156, 0), (155, 157, 158, 0), (158, 159, 155, 0), (154, 157, 155, 0), (160, 163, 164, 0),
— VRML: [# triangle 175
— ]
(165, 160, 164, 0), (162, 165, 166, 0), (166, 161, 162, 0), (160, 165, 162, 0), (167, 170, 171, 0), (172, 167, 171, 0), (169, 172, 173, 0), (173, 168, 169, 0),
(167, 172, 169, 0), (175, 174, 177, 0), (178, 175, 177, 0), (176, 178, 179, 0), (179, 180, 176, 0), (175, 178, 176, 0) — 190
);
— VRML: [# 190 triangles
— ]
— last index now: 0
— end Separator # 2
— VRML: [#triangle mesh
— ]
— last index now: 0
— end Separator # 2
— VRML: [# triangle mesh
— ]
procedure Create (
Object : in out GLOBE_3D.p_Object_3D;
Scale : GLOBE_3D.Real;
Centre : GLOBE_3D.Point_3D
)
is
face_0 : Face_type; — takes defaults values
begin
Object :=
new Object_3D (Max_points => 180, Max_faces => 190);
Object.all.Centre := Centre;
Set_name (Object.all, “insect_body”);
face_0.skin := material_only;
face_0.material := VRML_Defaults;
— Creating separator # 1
if Almost_zero (Scale – 1.0) then
Object.all.Point (1 .. 180) := coord_1;
else
for p in 1 .. 180 loop
Object.all.Point (0 + p) := Scale * coord_1 (p);
end loop;
end if;
face_0.material := matos_1;
— Creating separator # 2
for f in 1 .. 190 loop
face_0.P := idx_2 (f);
Object.all.face (0 + f) := face_0;
end loop;
end Create;
end Arrow_P;
— Converted by Wrl2Ada