zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
110 stars 22 forks source link

edgedivcmd.cc reverses addTriangleToGroup's args #178

Closed m-7761 closed 1 year ago

m-7761 commented 2 years ago

https://github.com/zturtleman/mm3d/blob/53b0d1b33412bddacd65559f41d5511b9050a27a/src/commands/edgedivcmd.cc#L109-L112

Unrelated: Below is some code for adding texture coordinates to this command..

                float st[2][3],dst[2][3];               
                model->getTextureCoords(tri,st); //2022                                 

                for(int i=2;i-->0;)
                {
                    dst[i][a] = (st[i][a]+st[i][b])*0.5f;
                    dst[i][b] = st[i][b];
                    dst[i][c] = st[i][c];
                }
                model->setTextureCoords(newTri,dst);

                for(int i=2;i-->0;)
                {
                    dst[i][a] = st[i][a];
                    dst[i][b] = (st[i][a]+st[i][b])*0.5f;
                    dst[i][c] = st[i][c];
                }
                model->setTextureCoords(tri,dst);
zturtleman commented 1 year ago

Fixed Edge Divide group in 74377bbfae114da6c10e5648031fed98a206043b and texture coords in df58eb9585a1c7322ce2ab6e9309d61e484c3512. Thanks.