You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building Voronoi cell geometry from the triangulation through the ConvexCell class as follows:
for(GEO::index_t nn = 0; nn < cell.nb_v(); nn++) {
if(cell.vertex_triangle(nn) == VBW::END_OF_LIST)
continue;
if(cell.v_global_index(nn) == VBW::global_index_t(-1))
continue;
VBW::index_t start = cell.vertex_triangle(nn);
VBW::index_t t = start;
do {
if(t != GEO::index_t(-1)) {
// Here: t must be converted to VBW::ushortconst GEO::vec3 vertex = cell.triangle_point(t);
// Actual computation on cell vertex
}
// Continue traversal
VBW::index_t lv = cell.triangle_find_vertex(t, nn);
t = cell.triangle_adjacent(t, (lv + 1) % 3);
} while(t != start);
}
In this example, the user must perform a cast from VBW::index_t to VBW::ushort even if it seems that the API actually only needs a VBW::ushort from function declaration:
index_t vertex_triangle(index_t v) const -> Returns a VBW::index_t by performing a cast from a VBW::ushort.
vec3 triangle_point(ushort t) const -> Asks for a VBW::ushort which is converted to VBW::index_t in its call of compute_triangle_point
The text was updated successfully, but these errors were encountered:
I'm building Voronoi cell geometry from the triangulation through the
ConvexCell
class as follows:In this example, the user must perform a cast from
VBW::index_t
toVBW::ushort
even if it seems that the API actually only needs aVBW::ushort
from function declaration:index_t vertex_triangle(index_t v) const
-> Returns aVBW::index_t
by performing a cast from aVBW::ushort
.vec3 triangle_point(ushort t) const
-> Asks for aVBW::ushort
which is converted toVBW::index_t
in its call ofcompute_triangle_point
The text was updated successfully, but these errors were encountered: