Debian Codegraph @

tests/manual/rhi/shared/cube.h

raw
1 /*
2 * Copyright (c) 2015-2016 The Khronos Group Inc.
3 * Copyright (c) 2015-2016 Valve Corporation
4 * Copyright (c) 2015-2016 LunarG, Inc.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * Author: Chia-I Wu <[email protected]>
19 * Author: Courtney Goeltzenleuchter <[email protected]>
20 * Author: Ian Elliott <[email protected]>
21 * Author: Ian Elliott <[email protected]>
22 * Author: Jon Ashburn <[email protected]>
23 * Author: Gwan-gyeong Mun <[email protected]>
24 * Author: Tony Barbour <[email protected]>
25 * Author: Bill Hollings <[email protected]>
26 */
27
28 // Normals added by Qt.
29
30 #ifndef CUBE_H
31 #define CUBE_H
32
33 // clang-format off
34 static const float cube[] = {
35 -1.0f,-1.0f,-1.0f, // -X side
36 -1.0f,-1.0f, 1.0f,
37 -1.0f, 1.0f, 1.0f,
38 -1.0f, 1.0f, 1.0f,
39 -1.0f, 1.0f,-1.0f,
40 -1.0f,-1.0f,-1.0f,
41
42 -1.0f,-1.0f,-1.0f, // -Z side
43 1.0f, 1.0f,-1.0f,
44 1.0f,-1.0f,-1.0f,
45 -1.0f,-1.0f,-1.0f,
46 -1.0f, 1.0f,-1.0f,
47 1.0f, 1.0f,-1.0f,
48
49 -1.0f,-1.0f,-1.0f, // -Y side
50 1.0f,-1.0f,-1.0f,
51 1.0f,-1.0f, 1.0f,
52 -1.0f,-1.0f,-1.0f,
53 1.0f,-1.0f, 1.0f,
54 -1.0f,-1.0f, 1.0f,
55
56 -1.0f, 1.0f,-1.0f, // +Y side
57 -1.0f, 1.0f, 1.0f,
58 1.0f, 1.0f, 1.0f,
59 -1.0f, 1.0f,-1.0f,
60 1.0f, 1.0f, 1.0f,
61 1.0f, 1.0f,-1.0f,
62
63 1.0f, 1.0f,-1.0f, // +X side
64 1.0f, 1.0f, 1.0f,
65 1.0f,-1.0f, 1.0f,
66 1.0f,-1.0f, 1.0f,
67 1.0f,-1.0f,-1.0f,
68 1.0f, 1.0f,-1.0f,
69
70 -1.0f, 1.0f, 1.0f, // +Z side
71 -1.0f,-1.0f, 1.0f,
72 1.0f, 1.0f, 1.0f,
73 -1.0f,-1.0f, 1.0f,
74 1.0f,-1.0f, 1.0f,
75 1.0f, 1.0f, 1.0f,
76
77 // UVs
78 0.0f, 1.0f, // -X side
79 1.0f, 1.0f,
80 1.0f, 0.0f,
81 1.0f, 0.0f,
82 0.0f, 0.0f,
83 0.0f, 1.0f,
84
85 1.0f, 1.0f, // -Z side
86 0.0f, 0.0f,
87 0.0f, 1.0f,
88 1.0f, 1.0f,
89 1.0f, 0.0f,
90 0.0f, 0.0f,
91
92 1.0f, 0.0f, // -Y side
93 1.0f, 1.0f,
94 0.0f, 1.0f,
95 1.0f, 0.0f,
96 0.0f, 1.0f,
97 0.0f, 0.0f,
98
99 1.0f, 0.0f, // +Y side
100 0.0f, 0.0f,
101 0.0f, 1.0f,
102 1.0f, 0.0f,
103 0.0f, 1.0f,
104 1.0f, 1.0f,
105
106 1.0f, 0.0f, // +X side
107 0.0f, 0.0f,
108 0.0f, 1.0f,
109 0.0f, 1.0f,
110 1.0f, 1.0f,
111 1.0f, 0.0f,
112
113 0.0f, 0.0f, // +Z side
114 0.0f, 1.0f,
115 1.0f, 0.0f,
116 0.0f, 1.0f,
117 1.0f, 1.0f,
118 1.0f, 0.0f,
119
120 // normals
121 -1.0, 0.0, 0.0, // -X side
122 -1.0, 0.0, 0.0,
123 -1.0, 0.0, 0.0,
124 -1.0, 0.0, 0.0,
125 -1.0, 0.0, 0.0,
126 -1.0, 0.0, 0.0,
127
128 0.0, 0.0, -1.0, // -Z side
129 0.0, 0.0, -1.0,
130 0.0, 0.0, -1.0,
131 0.0, 0.0, -1.0,
132 0.0, 0.0, -1.0,
133 0.0, 0.0, -1.0,
134
135 0.0, -1.0, 0.0, // -Y side
136 0.0, -1.0, 0.0,
137 0.0, -1.0, 0.0,
138 0.0, -1.0, 0.0,
139 0.0, -1.0, 0.0,
140 0.0, -1.0, 0.0,
141
142 0.0, 1.0, 0.0, // +Y side
143 0.0, 1.0, 0.0,
144 0.0, 1.0, 0.0,
145 0.0, 1.0, 0.0,
146 0.0, 1.0, 0.0,
147 0.0, 1.0, 0.0,
148
149 1.0, 0.0, 0.0, // +X side
150 1.0, 0.0, 0.0,
151 1.0, 0.0, 0.0,
152 1.0, 0.0, 0.0,
153 1.0, 0.0, 0.0,
154 1.0, 0.0, 0.0,
155
156 0.0, 0.0, 1.0, // +Z side
157 0.0, 0.0, 1.0,
158 0.0, 0.0, 1.0,
159 0.0, 0.0, 1.0,
160 0.0, 0.0, 1.0,
161 0.0, 0.0, 1.0
162 };
163 // clang-format on
164
165 #endif