41 SLushort i = 0, v1 = 0, v2 = 0,
v3 = 0, v4 = 0;
53 P.push_back(
SLVec3f( t, t, t));
C.push_back(r); v1=i; i++;
54 P.push_back(
SLVec3f(1-h, t, t));
C.push_back(r); v2=i; i++;
55 P.push_back(
SLVec3f(1-h, t,-t));
C.push_back(r);
v3=i; i++;
56 P.push_back(
SLVec3f( t, t,-t));
C.push_back(r); v4=i; i++;
57 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
58 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
60 P.push_back(
SLVec3f( t,-t, t));
C.push_back(r); v1=i; i++;
61 P.push_back(
SLVec3f(1-h,-t, t));
C.push_back(r); v2=i; i++;
62 P.push_back(
SLVec3f(1-h, t, t));
C.push_back(r);
v3=i; i++;
63 P.push_back(
SLVec3f( t, t, t));
C.push_back(r); v4=i; i++;
64 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
65 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
67 P.push_back(
SLVec3f( t,-t,-t));
C.push_back(r); v1=i; i++;
68 P.push_back(
SLVec3f(1-h,-t,-t));
C.push_back(r); v2=i; i++;
69 P.push_back(
SLVec3f(1-h,-t, t));
C.push_back(r);
v3=i; i++;
70 P.push_back(
SLVec3f( t,-t, t));
C.push_back(r); v4=i; i++;
71 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
72 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
74 P.push_back(
SLVec3f( t, t,-t));
C.push_back(r); v1=i; i++;
75 P.push_back(
SLVec3f(1-h, t,-t));
C.push_back(r); v2=i; i++;
76 P.push_back(
SLVec3f(1-h,-t,-t));
C.push_back(r);
v3=i; i++;
77 P.push_back(
SLVec3f( t,-t,-t));
C.push_back(r); v4=i; i++;
78 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
79 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
81 P.push_back(
SLVec3f(1-h, w, w));
C.push_back(r); v1=i; i++;
82 P.push_back(
SLVec3f( 1, 0, 0));
C.push_back(r); v2=i; i++;
83 P.push_back(
SLVec3f(1-h, w,-w));
C.push_back(r);
v3=i; i++;
84 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
85 P.push_back(
SLVec3f(1-h, w, w));
C.push_back(r); v1=i; i++;
86 P.push_back(
SLVec3f(1-h,-w, w));
C.push_back(r); v2=i; i++;
87 P.push_back(
SLVec3f( 1, 0, 0));
C.push_back(r);
v3=i; i++;
88 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
89 P.push_back(
SLVec3f(1-h,-w, w));
C.push_back(r); v1=i; i++;
90 P.push_back(
SLVec3f(1-h,-w,-w));
C.push_back(r); v2=i; i++;
91 P.push_back(
SLVec3f( 1, 0, 0));
C.push_back(r);
v3=i; i++;
92 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
93 P.push_back(
SLVec3f(1-h,-w,-w));
C.push_back(r); v1=i; i++;
94 P.push_back(
SLVec3f(1-h, w,-w));
C.push_back(r); v2=i; i++;
95 P.push_back(
SLVec3f( 1, 0, 0));
C.push_back(r);
v3=i; i++;
96 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
97 P.push_back(
SLVec3f(1-h, w, w));
C.push_back(r); v1=i; i++;
98 P.push_back(
SLVec3f(1-h, w,-w));
C.push_back(r); v2=i; i++;
99 P.push_back(
SLVec3f(1-h,-w,-w));
C.push_back(r);
v3=i; i++;
100 P.push_back(
SLVec3f(1-h,-w, w));
C.push_back(r); v4=i; i++;
101 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
102 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
104 P.push_back(
SLVec3f( -t, t, t));
C.push_back(r); v1=i; i++;
105 P.push_back(
SLVec3f( -t, t,-t));
C.push_back(r); v2=i; i++;
106 P.push_back(
SLVec3f( -t,-t,-t));
C.push_back(r);
v3=i; i++;
107 P.push_back(
SLVec3f( -t,-t, t));
C.push_back(r); v4=i; i++;
108 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
109 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
112 P.push_back(
SLVec3f( t, t, t));
C.push_back(g); v1=i; i++;
113 P.push_back(
SLVec3f( t,1-h, t));
C.push_back(g); v2=i; i++;
114 P.push_back(
SLVec3f( t,1-h,-t));
C.push_back(g);
v3=i; i++;
115 P.push_back(
SLVec3f( t, t,-t));
C.push_back(g); v4=i; i++;
116 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
117 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
119 P.push_back(
SLVec3f(-t, t, t));
C.push_back(g); v1=i; i++;
120 P.push_back(
SLVec3f(-t,1-h, t));
C.push_back(g); v2=i; i++;
121 P.push_back(
SLVec3f( t,1-h, t));
C.push_back(g);
v3=i; i++;
122 P.push_back(
SLVec3f( t, t, t));
C.push_back(g); v4=i; i++;
123 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
124 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
126 P.push_back(
SLVec3f(-t, t,-t));
C.push_back(g); v1=i; i++;
127 P.push_back(
SLVec3f(-t,1-h,-t));
C.push_back(g); v2=i; i++;
128 P.push_back(
SLVec3f(-t,1-h, t));
C.push_back(g);
v3=i; i++;
129 P.push_back(
SLVec3f(-t, t, t));
C.push_back(g); v4=i; i++;
130 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
131 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
133 P.push_back(
SLVec3f( t, t,-t));
C.push_back(g); v1=i; i++;
134 P.push_back(
SLVec3f( t,1-h,-t));
C.push_back(g); v2=i; i++;
135 P.push_back(
SLVec3f(-t,1-h,-t));
C.push_back(g);
v3=i; i++;
136 P.push_back(
SLVec3f(-t, t,-t));
C.push_back(g); v4=i; i++;
137 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
138 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
140 P.push_back(
SLVec3f( w,1-h, w));
C.push_back(g); v1=i; i++;
141 P.push_back(
SLVec3f( 0, 1, 0));
C.push_back(g); v2=i; i++;
142 P.push_back(
SLVec3f( w,1-h,-w));
C.push_back(g);
v3=i; i++;
143 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
145 P.push_back(
SLVec3f( w,1-h, w));
C.push_back(g); v1=i; i++;
146 P.push_back(
SLVec3f(-w,1-h, w));
C.push_back(g); v2=i; i++;
147 P.push_back(
SLVec3f( 0, 1, 0));
C.push_back(g);
v3=i; i++;
148 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
149 P.push_back(
SLVec3f(-w,1-h, w));
C.push_back(g); v1=i; i++;
150 P.push_back(
SLVec3f(-w,1-h,-w));
C.push_back(g); v2=i; i++;
151 P.push_back(
SLVec3f( 0, 1, 0));
C.push_back(g);
v3=i; i++;
152 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
154 P.push_back(
SLVec3f(-w,1-h,-w));
C.push_back(g); v1=i; i++;
155 P.push_back(
SLVec3f( w,1-h,-w));
C.push_back(g); v2=i; i++;
156 P.push_back(
SLVec3f( 0, 1, 0));
C.push_back(g);
v3=i; i++;
157 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
159 P.push_back(
SLVec3f( w,1-h, w));
C.push_back(g); v1=i; i++;
160 P.push_back(
SLVec3f( w,1-h,-w));
C.push_back(g); v2=i; i++;
161 P.push_back(
SLVec3f(-w,1-h,-w));
C.push_back(g);
v3=i; i++;
162 P.push_back(
SLVec3f(-w,1-h, w));
C.push_back(g); v4=i; i++;
163 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
164 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
166 P.push_back(
SLVec3f( t, -t, t));
C.push_back(g); v1=i; i++;
167 P.push_back(
SLVec3f( t, -t,-t));
C.push_back(g); v2=i; i++;
168 P.push_back(
SLVec3f(-t, -t,-t));
C.push_back(g);
v3=i; i++;
169 P.push_back(
SLVec3f(-t, -t, t));
C.push_back(g); v4=i; i++;
170 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v2);
171 I16.push_back(v1);
I16.push_back(v4);
I16.push_back(
v3);
174 P.push_back(
SLVec3f( t, t, t));
C.push_back(b); v1=i; i++;
175 P.push_back(
SLVec3f( t, t,1-h));
C.push_back(b); v2=i; i++;
176 P.push_back(
SLVec3f( t,-t,1-h));
C.push_back(b);
v3=i; i++;
177 P.push_back(
SLVec3f( t,-t, t));
C.push_back(b); v4=i; i++;
178 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
179 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
181 P.push_back(
SLVec3f(-t, t, t));
C.push_back(b); v1=i; i++;
182 P.push_back(
SLVec3f(-t, t,1-h));
C.push_back(b); v2=i; i++;
183 P.push_back(
SLVec3f( t, t,1-h));
C.push_back(b);
v3=i; i++;
184 P.push_back(
SLVec3f( t, t, t));
C.push_back(b); v4=i; i++;
185 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
186 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
188 P.push_back(
SLVec3f(-t,-t, t));
C.push_back(b); v1=i; i++;
189 P.push_back(
SLVec3f(-t,-t,1-h));
C.push_back(b); v2=i; i++;
190 P.push_back(
SLVec3f(-t, t,1-h));
C.push_back(b);
v3=i; i++;
191 P.push_back(
SLVec3f(-t, t, t));
C.push_back(b); v4=i; i++;
192 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
193 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
195 P.push_back(
SLVec3f( t,-t, t));
C.push_back(b); v1=i; i++;
196 P.push_back(
SLVec3f( t,-t,1-h));
C.push_back(b); v2=i; i++;
197 P.push_back(
SLVec3f(-t,-t,1-h));
C.push_back(b);
v3=i; i++;
198 P.push_back(
SLVec3f(-t,-t, t));
C.push_back(b); v4=i; i++;
199 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
200 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
202 P.push_back(
SLVec3f( w, w,1-h));
C.push_back(b); v1=i; i++;
203 P.push_back(
SLVec3f( 0, 0, 1));
C.push_back(b); v2=i; i++;
204 P.push_back(
SLVec3f( w,-w,1-h));
C.push_back(b);
v3=i; i++;
205 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
206 P.push_back(
SLVec3f( w, w,1-h));
C.push_back(b); v1=i; i++;
207 P.push_back(
SLVec3f(-w, w,1-h));
C.push_back(b); v2=i; i++;
208 P.push_back(
SLVec3f( 0, 0, 1));
C.push_back(b);
v3=i; i++;
209 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
211 P.push_back(
SLVec3f(-w, w,1-h));
C.push_back(b); v1=i; i++;
212 P.push_back(
SLVec3f(-w,-w,1-h));
C.push_back(b); v2=i; i++;
213 P.push_back(
SLVec3f( 0, 0, 1));
C.push_back(b);
v3=i; i++;
214 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
215 P.push_back(
SLVec3f(-w,-w,1-h));
C.push_back(b); v1=i; i++;
216 P.push_back(
SLVec3f( w,-w,1-h));
C.push_back(b); v2=i; i++;
217 P.push_back(
SLVec3f( 0, 0, 1));
C.push_back(b);
v3=i; i++;
218 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
220 P.push_back(
SLVec3f( w, w,1-h));
C.push_back(b); v1=i; i++;
221 P.push_back(
SLVec3f( w,-w,1-h));
C.push_back(b); v2=i; i++;
222 P.push_back(
SLVec3f(-w,-w,1-h));
C.push_back(b);
v3=i; i++;
223 P.push_back(
SLVec3f(-w, w,1-h));
C.push_back(b); v4=i; i++;
224 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
225 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
227 P.push_back(
SLVec3f( t, t, -t));
C.push_back(b); v1=i; i++;
228 P.push_back(
SLVec3f( t,-t, -t));
C.push_back(b); v2=i; i++;
229 P.push_back(
SLVec3f(-t,-t, -t));
C.push_back(b);
v3=i; i++;
230 P.push_back(
SLVec3f(-t, t, -t));
C.push_back(b); v4=i; i++;
231 I16.push_back(v1);
I16.push_back(v2);
I16.push_back(
v3);
232 I16.push_back(v1);
I16.push_back(
v3);
I16.push_back(v4);
SLVec3< SLfloat > SLVec3f
Toplevel holder of the assets meshes, materials, textures and shaders.
SLfloat _arrowThickness
Thickness of the arrow.
SLCoordAxis(SLAssetManager *assetMgr, SLfloat arrowThickness=0.05f, SLfloat arrowHeadLenght=0.2f, SLfloat arrowHeadWidth=0.1f)
SLAxis::SLAxis ctor with the arrow dimensions.
void buildMesh()
SLCoordAxis::buildMesh fills in the underlying arrays from the SLMesh object.
SLfloat _arrowHeadLength
Lenght of the arrow head.
SLfloat _arrowHeadWidth
Width of the arrow head.
An SLMesh object is a triangulated mesh, drawn with one draw call.
SLVuint I32
Vector of vertex indices 32 bit.
SLVushort I16
Vector of vertex indices 16 bit.
SLVCol4f C
Vector of vertex colors (opt.) layout (location = 4)
SLVVec3f N
Vector for vertex normals (opt.) layout (location = 1)
SLVVec2f UV[2]
Array of 2 Vectors for tex. coords. (opt.) layout (location = 2)
SLVVec3f P
Vector for vertex positions layout (location = 0)
V3 v3(float x, float y, float z)