Blender  V2.93
geom_cube_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 const float verts[][3] = {
27  {1.000000, 1.000000, -1.000000},
28  {1.000000, -1.000000, -1.000000},
29  {-1.000000, -1.000000, -1.000000},
30  {-1.000000, 1.000000, -1.000000},
31  {1.000000, 1.000000, 1.000000},
32  {0.999999, -1.000001, 1.000000},
33  {-1.000000, -1.000000, 1.000000},
34  {-1.000000, 1.000000, 1.000000},
35 };
36 
37 static const float normals[][3] = {
38  {0.577349, 0.577349, -0.577349},
39  {0.577349, -0.577349, -0.577349},
40  {-0.577349, -0.577349, -0.577349},
41  {-0.577349, 0.577349, -0.577349},
42  {0.577349, 0.577349, 0.577349},
43  {0.577349, -0.577349, 0.577349},
44  {-0.577349, -0.577349, 0.577349},
45  {-0.577349, 0.577349, 0.577349},
46 };
47 
48 static const ushort indices[] = {
49  1, 2, 3, 7, 6, 5, 4, 5, 1, 5, 6, 2, 2, 6, 7, 0, 3, 7,
50  0, 1, 3, 4, 7, 5, 0, 4, 1, 1, 5, 2, 3, 2, 7, 4, 0, 7,
51 };
52 
54  .nverts = 8,
55  .ntris = 12,
56  .verts = verts,
57  .normals = normals,
58  .indices = indices,
59 };
unsigned short ushort
Definition: BLI_sys_types.h:84
GizmoGeomInfo wm_gizmo_geom_data_cube
static const ushort indices[]
static const float verts[][3]
static const float normals[][3]