Cleanup: update naming for dualcon: rename loop corner_verts

These weren't the equivalent of MLoop's even with the old naming
this was misleading, especially `DualConInput::mloop`.
This commit is contained in:
Campbell Barton
2025-01-22 19:57:23 +11:00
parent 6c05859b12
commit e8ebbce9c5
3 changed files with 16 additions and 17 deletions

View File

@@ -15,10 +15,10 @@ typedef float (*DualConCo)[3];
typedef unsigned int (*DualConTri)[3];
typedef unsigned int *DualConLoop;
typedef unsigned int *DualConCornerVerts;
typedef struct DualConInput {
DualConLoop mloop;
DualConCornerVerts corner_verts;
DualConCo co;
int co_stride;
@@ -28,7 +28,7 @@ typedef struct DualConInput {
int tri_stride;
int tottri;
int loop_stride;
int corner_verts_stride;
float min[3], max[3];
} DualConInput;

View File

@@ -26,8 +26,8 @@ static void veccopy(float dst[3], const float src[3])
#define GET_CO(_mesh, _n) (*(DualConCo)(((char *)(_mesh)->co) + ((_n) * (_mesh)->co_stride)))
#define GET_LOOP(_mesh, _n) \
(*(DualConLoop)(((char *)(_mesh)->mloop) + ((_n) * (_mesh)->loop_stride)))
#define GET_CORNER_VERT(_mesh, _n) \
(*(DualConCornerVerts)(((char *)(_mesh)->corner_verts) + ((_n) * (_mesh)->corner_verts_stride)))
class DualConInputReader : public ModelReader {
private:
@@ -80,9 +80,9 @@ class DualConInputReader : public ModelReader {
Triangle *t = new Triangle();
const unsigned int *tr = GET_TRI(input_mesh, curtri);
veccopy(t->vt[0], GET_CO(input_mesh, GET_LOOP(input_mesh, tr[0])));
veccopy(t->vt[1], GET_CO(input_mesh, GET_LOOP(input_mesh, tr[1])));
veccopy(t->vt[2], GET_CO(input_mesh, GET_LOOP(input_mesh, tr[2])));
veccopy(t->vt[0], GET_CO(input_mesh, GET_CORNER_VERT(input_mesh, tr[0])));
veccopy(t->vt[1], GET_CO(input_mesh, GET_CORNER_VERT(input_mesh, tr[1])));
veccopy(t->vt[2], GET_CO(input_mesh, GET_CORNER_VERT(input_mesh, tr[2])));
curtri++;