Skip to content

Commit

Permalink
rename mesh->prim->count into nPolygons
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Jan 26, 2024
1 parent 33f7e1c commit 7bf04eb
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/ak/geom.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct AkMeshPrimitive {
AkTree *extra;
void *udata;
AkMeshPrimitiveType type;
uint32_t count;
uint32_t nPolygons;
uint32_t inputCount;
AkFloat3 center;

Expand Down
2 changes: 1 addition & 1 deletion src/io/dae/core/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/io/dae/core/poly.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/io/dae/core/triangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/io/ply/ply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/io/stl/stl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/mesh/triangulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7bf04eb

Please sign in to comment.