From 7bf04ebbf0455003fe938b96ce2e3264157ef036 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Fri, 26 Jan 2024 13:17:48 +0300 Subject: [PATCH] rename mesh->prim->count into nPolygons --- include/ak/geom.h | 2 +- src/io/dae/core/line.c | 2 +- src/io/dae/core/poly.c | 2 +- src/io/dae/core/triangle.c | 4 ++-- src/io/ply/ply.c | 2 +- src/io/stl/stl.c | 2 +- src/mesh/triangulate.c | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/ak/geom.h b/include/ak/geom.h index 12b73106..7a2cb2b9 100644 --- a/include/ak/geom.h +++ b/include/ak/geom.h @@ -90,7 +90,7 @@ typedef struct AkMeshPrimitive { AkTree *extra; void *udata; AkMeshPrimitiveType type; - uint32_t count; + uint32_t nPolygons; uint32_t inputCount; AkFloat3 center; diff --git a/src/io/dae/core/line.c b/src/io/dae/core/line.c index 1fa17b06..b020e0d4 100644 --- a/src/io/dae/core/line.c +++ b/src/io/dae/core/line.c @@ -36,7 +36,7 @@ dae_lines(DAEState * __restrict dst, lines->base.name = xmla_strdup_by(xml, heap, _s_dae_name, lines); lines->base.bindmaterial = xmla_strdup_by(xml, heap, _s_dae_material, lines); - lines->base.count = xmla_u32(xmla(xml, _s_dae_count), 0); + lines->base.nPolygons = xmla_u32(xmla(xml, _s_dae_count), 0); indexoff = 0; xml = xml->val; diff --git a/src/io/dae/core/poly.c b/src/io/dae/core/poly.c index abe62610..b69c2e03 100644 --- a/src/io/dae/core/poly.c +++ b/src/io/dae/core/poly.c @@ -39,7 +39,7 @@ dae_poly(DAEState * __restrict dst, poly->base.name = xmla_strdup_by(xml, heap, _s_dae_name, poly); poly->base.bindmaterial = xmla_strdup_by(xml, heap, _s_dae_material, poly); - poly->base.count = xmla_u32(xmla(xml, _s_dae_count), 0); + poly->base.nPolygons = xmla_u32(xmla(xml, _s_dae_count), 0); polyi = NULL; indexoff = 0; diff --git a/src/io/dae/core/triangle.c b/src/io/dae/core/triangle.c index 3753d446..f271c667 100644 --- a/src/io/dae/core/triangle.c +++ b/src/io/dae/core/triangle.c @@ -36,8 +36,8 @@ dae_triangles(DAEState * __restrict dst, tri->base.name = xmla_strdup_by(xml, heap, _s_dae_name, tri); tri->base.bindmaterial = xmla_strdup_by(xml, heap, _s_dae_material, tri); - tri->base.count = xmla_u32(xmla(xml, _s_dae_count), 0); - + tri->base.nPolygons = xmla_u32(xmla(xml, _s_dae_count), 0); + indexoff = 0; xml = xml->val; diff --git a/src/io/ply/ply.c b/src/io/ply/ply.c index ba7f7da2..9bc52ed1 100644 --- a/src/io/ply/ply.c +++ b/src/io/ply/ply.c @@ -475,7 +475,7 @@ ply_finish(PLYState * __restrict pst) { prim = (AkMeshPrimitive *)tri; prim->indexStride = 1; - prim->count = pst->count; + prim->nPolygons = pst->count; prim->mesh = mesh; mesh->primitive = prim; mesh->primitiveCount = 1; diff --git a/src/io/stl/stl.c b/src/io/stl/stl.c index a38f0f94..dfccb646 100644 --- a/src/io/stl/stl.c +++ b/src/io/stl/stl.c @@ -270,7 +270,7 @@ sst_finish(STLState * __restrict sst) { prim = (AkMeshPrimitive *)poly; } - prim->count = sst->count; + prim->nPolygons = sst->count; prim->mesh = mesh; mesh->primitive = prim; mesh->primitiveCount = 1; diff --git a/src/mesh/triangulate.c b/src/mesh/triangulate.c index bc0f7f7a..7e9b90f6 100644 --- a/src/mesh/triangulate.c +++ b/src/mesh/triangulate.c @@ -141,8 +141,8 @@ ak_meshTriangulatePoly(AkPolygon * __restrict poly) { } ak_free(poly->base.indices); - poly->base.indices = newind; - poly->base.count = nGenTrigs + nTrigs; + poly->base.indices = newind; + poly->base.nPolygons = nGenTrigs + nTrigs; /* no need to this info anymore, save space! */ ak_free(poly->vcount);