Function VectorMath.ReversesFaceOrientations
ReversesFaceOrientations
(Matrix4x4 matrix)
True if the matrix will reverse orientations of faces.
Public
Static
bool ReversesFaceOrientations (
matrix |
True if the matrix will reverse orientations of faces.
Scaling by a negative value along an odd number of axes will reverse the orientation of e.g faces on a mesh. This must be counter adjusted by for example the recast rasterization system to be able to handle meshes with negative scales properly.
We can find out if they are flipped by finding out how the signed volume of a unit cube is transformed when applying the matrix
If the (signed) volume turns out to be negative that also means that the orientation of it has been reversed.