d00e574657
The interface SurfaceTool presents for tangents and all its usages work with tangent frames represented as 4 values: tangent direction and scalar orientation (+1 or -1). However, internally it was represented as tangent+bitangent (mistakenly called binormal), which introduces additional conversions back & forth and is problematic for replacing the tangent space generation algorithm. This change converts the internal storage and adjusts the calling code accordingly. Note that since SurfaceTool::set_tangent is exposed to scripts, I've kept the Plane interface there even though it's misleading to use this type here.