Not sure, but I feel like it should be possible to achieve this without having to convert the quaternions to rotation matrices and back? That could also be left for a future update of course
Here is my idea for calculating normals:
- For the vertex normals: these are just the same as the position (if you have not yet scaled by the radius). (The normal of a point on the unit sphere is…
I know this is just WIP, but I was interested to see how you constructed the icosphere.
I think it is possible to speed this up a little bit:
If a
and b
are normalized, then the cross product is automatically normalized.
I would suggest only scaling by the radius after all the points (also the subdivided) have been calculated. This way you avoid having to do expensive normalisations later.
Sorry for the delay! That sounds great to me. And yeah, I guess we'll have to update test results for edge indices.
No problem, have been busy with other stuff as well.
I merged main…
I added the changes I talked about. The function can now detect if the meshes are just isomorphic or exactly equal.
Still have to remove the BKE_mesh_cmp
function. (Wanted your approval for…
Doesn't this
meshes_unisomorphic
test also check the same things thatBKE_mesh_cmp
checked? I had thought of this as a superset of the original comparison tests. It would be great to get rid…
I think you are right. I will change it so that the normal comparison is run, but if the test fails, then a check is done to see if they are isomorphic.
I really wanted to use something like Result<(), MeshMismatch>
in rust, but ended up with this instead. I completely agree with you, and will change the name to meshes_unisomorphic
which fits…
I completely replaced BKE_mesh_cmp
now. I ended up keeping the threshold
parameter, since there are some tests that set it explicitly. All the current tests still pass with the new comparison…