class MAGES::MeshDeformations::Editor::ObjExporter¶
Overview¶
Editor-only helper that serializes a Mesh to Wavefront OBJ text. More…
Detailed Documentation¶
Editor-only helper that serializes a Mesh to Wavefront OBJ text.
Coordinate convention: Unity is left-handed (Y-up, +Z forward), while most OBJ consumers (Blender, Maya, etc.) expect a right-handed space. To keep exported geometry both upright and correctly-facing we flip the X axis and reverse triangle winding :
Vertex:
v = (-x, y, z)Normal:
vn = (-nx, ny, nz)Faces: triangle indices are emitted in reversed order (
a, c, b) so faces stay outward-facing after the axis flip.
Only attributes present on the mesh are emitted (positions always; UV channel 0 and normals only when populated). Vertices are exported in local space as-is. Floats are formatted with CultureInfo.InvariantCulture so the decimal separator is always ‘.’ regardless of the machine locale.