Blender  V2.93
geom_arrow_gizmo.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2016 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #include "../gizmo_geometry.h"
25 
26 static float verts[][3] = {
27  {-0.000000, 0.012320, 0.000000}, {-0.000000, 0.012320, 0.974306},
28  {0.008711, 0.008711, 0.000000}, {0.008711, 0.008711, 0.974306},
29  {0.012320, -0.000000, 0.000000}, {0.012320, -0.000000, 0.974306},
30  {0.008711, -0.008711, 0.000000}, {0.008711, -0.008711, 0.974306},
31  {-0.000000, -0.012320, 0.000000}, {-0.000000, -0.012320, 0.974306},
32  {-0.008711, -0.008711, 0.000000}, {-0.008711, -0.008711, 0.974306},
33  {-0.012320, 0.000000, 0.000000}, {-0.012320, 0.000000, 0.974306},
34  {-0.008711, 0.008711, 0.000000}, {-0.008711, 0.008711, 0.974306},
35  {0.000000, 0.072555, 0.974306}, {0.051304, 0.051304, 0.974306},
36  {0.072555, -0.000000, 0.974306}, {0.051304, -0.051304, 0.974306},
37  {-0.000000, -0.072555, 0.974306}, {-0.051304, -0.051304, 0.974306},
38  {-0.072555, 0.000000, 0.974306}, {-0.051304, 0.051304, 0.974306},
39  {0.000000, -0.000000, 1.268098},
40 };
41 
42 static float normals[][3] = {
43  {0.000000, 0.776360, -0.630238}, {0.000000, 0.594348, -0.804163},
44  {0.548967, 0.548967, -0.630238}, {0.420270, 0.420270, -0.804163},
45  {0.776360, 0.000000, -0.630238}, {0.594378, 0.000000, -0.804163},
46  {0.548967, -0.548967, -0.630238}, {0.420270, -0.420270, -0.804163},
47  {0.000000, -0.776360, -0.630238}, {0.000000, -0.594378, -0.804163},
48  {-0.548967, -0.548967, -0.630238}, {-0.420270, -0.420270, -0.804163},
49  {-0.776360, 0.000000, -0.630238}, {-0.594378, 0.000000, -0.804163},
50  {-0.548967, 0.548967, -0.630238}, {-0.420270, 0.420270, -0.804163},
51  {0.000000, 0.843226, -0.537492}, {0.596271, 0.596271, -0.537492},
52  {0.843226, 0.000000, -0.537492}, {0.596271, -0.596271, -0.537492},
53  {0.000000, -0.843226, -0.537492}, {-0.596271, -0.596271, -0.537492},
54  {-0.843226, 0.000000, -0.537492}, {-0.596271, 0.596271, -0.537492},
55  {0.000000, 0.000000, 1.000000},
56 };
57 
58 static ushort indices[] = {
59  1, 3, 2, 3, 5, 4, 5, 7, 6, 7, 9, 8, 9, 11, 10, 11, 13, 12, 5, 18, 19, 15, 1,
60  0, 13, 15, 14, 6, 10, 14, 11, 21, 22, 7, 19, 20, 13, 22, 23, 3, 17, 18, 9, 20, 21, 15,
61  23, 16, 1, 16, 17, 23, 22, 24, 21, 20, 24, 19, 18, 24, 17, 16, 24, 16, 23, 24, 22, 21, 24,
62  20, 19, 24, 18, 17, 24, 0, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11,
63  12, 7, 5, 19, 14, 15, 0, 12, 13, 14, 14, 0, 2, 2, 4, 6, 6, 8, 10, 10, 12, 14, 14,
64  2, 6, 13, 11, 22, 9, 7, 20, 15, 13, 23, 5, 3, 18, 11, 9, 21, 1, 15, 16, 3, 1, 17,
65 };
66 
68  .nverts = 25,
69  .ntris = 46,
70  .verts = verts,
71  .normals = normals,
72  .indices = indices,
73 };
unsigned short ushort
Definition: BLI_sys_types.h:84
GizmoGeomInfo wm_gizmo_geom_data_arrow
static ushort indices[]
static float verts[][3]
static float normals[][3]