17 v.
p.
x = current_vertex.x;
18 v.
p.
y = current_vertex.y;
19 v.
p.
z = current_vertex.z;
23 for (
size_t i = 0; i < pmesh->GetIndexes().size() - 2; i += 3) {
26 auto indices = pmesh->GetIndexes();
27 t.
v[0] =
static_cast<int>(indices[i] - 1);
28 t.
v[1] =
static_cast<int>(indices[i + 1] - 1);
29 t.
v[2] =
static_cast<int>(indices[i + 2] - 1);
34 float target_size =
static_cast<float>(
Simplification.triangles.size());
37 pmesh->GetVertices().clear();
38 pmesh->GetIndexes().clear();
42 v.
x =
static_cast<float>(current_vertex.p.x);
43 v.
y =
static_cast<float>(current_vertex.p.y);
44 v.
z =
static_cast<float>(current_vertex.p.z);
49 pmesh->GetIndexes().push_back(
static_cast<size_t>((
Simplification.triangles[i].v[0]) + 1));
50 pmesh->GetIndexes().push_back(
static_cast<size_t>((
Simplification.triangles[i].v[1]) + 1));
51 pmesh->GetIndexes().push_back(
static_cast<size_t>((
Simplification.triangles[i].v[2]) + 1));