Why do you need to invert the X value during mesh export?

I’ve been using the ExportOBJ script from the Unify wiki for some time now, but I’ve since realized that meshes exporting from it our flipped so you get a kind of mirror image version of the model. When I searched around a little, I found that Unify Wiki has another OBJ exporter script, and the main difference I saw was that it inverts the x coordinate of the vertex.

Vector3 wv = mf.transform.TransformPoint(lv);
//This is sort of ugly - inverting x-component since we're in
//a different coordinate system than "everyone" is "used to".
sb.Append(string.Format("v {0} {1} {2}

",-wv.x,wv.y,wv.z));

But it confesses in the comments that “this is sort of ugly.” What is going on here? Nevertheless, the script worked correctly. For my own edification, I’m trying to figure out what’s going on in this script. Why the need to invert the X vertex? And what makes it"ugly"? Is there a better way?

Original ExportOBJ.cs script

ObjExporter script // This one works, sorta

There are two different ways to do 3D coordinate systems… “left handed” systems and “right handed” systems. Not all 3D packages use the same one.

For more information read this:

http://www.evl.uic.edu/ralph/508S98/coordinates.html