@@ -79,8 +79,8 @@ __global__ static void __launch_bounds__(blockThreads)
7979 v2 == v3) {
8080 return ;
8181 }
82- const vec3<T> p0 ( coords (v0, 0 ), coords (v0, 1 ), coords (v0, 2 ) );
83- const vec3<T> p1 ( coords (v1, 0 ), coords (v1, 1 ), coords (v1, 2 ) );
82+ const vec3<T> p0 = coords. to_glm < 3 > (v0);
83+ const vec3<T> p1 = coords. to_glm < 3 > (v1);
8484 const T edge_len_sq = glm::distance2 (p0, p1);
8585
8686 if (edge_len_sq < low_edge_len_sq) {
@@ -124,8 +124,8 @@ __global__ static void __launch_bounds__(blockThreads)
124124
125125 cavity.get_vertices (src, v0, v1);
126126
127- const vec3<T> p0 ( coords (v0, 0 ), coords (v0, 1 ), coords (v0, 2 ) );
128- const vec3<T> p1 ( coords (v1, 0 ), coords (v1, 1 ), coords (v1, 2 ) );
127+ const vec3<T> p0 = coords. to_glm < 3 > (v0);
128+ const vec3<T> p1 = coords. to_glm < 3 > (v1);
129129
130130 const vec3<T> new_p ((p0[0 ] + p1[0 ]) * T (0.5 ),
131131 (p0[1 ] + p1[1 ]) * T (0.5 ),
@@ -139,8 +139,7 @@ __global__ static void __launch_bounds__(blockThreads)
139139
140140 const VertexHandle vvv = cavity.get_cavity_vertex (c, i);
141141
142- const vec3<T> vp (
143- coords (vvv, 0 ), coords (vvv, 1 ), coords (vvv, 2 ));
142+ const vec3<T> vp = coords.to_glm <3 >(vvv);
144143
145144 const T edge_len_sq = glm::distance2 (vp, new_p);
146145
@@ -300,9 +299,10 @@ __global__ static void __launch_bounds__(blockThreads)
300299 return ;
301300 }
302301
303- const vec3<T> p0 (coords (v0, 0 ), coords (v0, 1 ), coords (v0, 2 ));
304- const vec3<T> p1 (coords (v1, 0 ), coords (v1, 1 ), coords (v1, 2 ));
305- const T edge_len_sq = glm::distance2 (p0, p1);
302+ const vec3<T> p0 = coords.to_glm <3 >(v0);
303+ const vec3<T> p1 = coords.to_glm <3 >(v1);
304+
305+ const T edge_len_sq = glm::distance2 (p0, p1);
306306
307307 if (edge_len_sq < low_edge_len_sq) {
308308
@@ -391,8 +391,8 @@ __global__ static void __launch_bounds__(blockThreads)
391391
392392 cavity.get_vertices (src, v0, v1);
393393
394- const vec3<T> p0 ( coords (v0, 0 ), coords (v0, 1 ), coords (v0, 2 ) );
395- const vec3<T> p1 ( coords (v1, 0 ), coords (v1, 1 ), coords (v1, 2 ) );
394+ const vec3<T> p0 = coords. to_glm < 3 > (v0);
395+ const vec3<T> p1 = coords. to_glm < 3 > (v1);
396396
397397 const vec3<T> new_p ((p0[0 ] + p1[0 ]) * T (0.5 ),
398398 (p0[1 ] + p1[1 ]) * T (0.5 ),
@@ -404,8 +404,7 @@ __global__ static void __launch_bounds__(blockThreads)
404404 for (uint16_t i = 0 ; i < size; ++i) {
405405 const VertexHandle vvv = cavity.get_cavity_vertex (c, i);
406406
407- const vec3<T> vp (
408- coords (vvv, 0 ), coords (vvv, 1 ), coords (vvv, 2 ));
407+ const vec3<T> vp = coords.to_glm <3 >(vvv);
409408
410409 const T edge_len_sq = glm::distance2 (vp, new_p);
411410 if (edge_len_sq > high_edge_len_sq) {
0 commit comments