Warzone2100 / WMIT

Warzone Model Import Tool - for use with Warzone 2100
GNU General Public License v3.0
16 stars 11 forks source link

merging points with same coords on import #2

Closed MaNGusT- closed 12 years ago

MaNGusT- commented 12 years ago

Currently WMIT merges points with same coords on import that is useful for models with 1-sided polys like bodies, props etc but gfx models are just squares that face at different sides and their points have same coords(since there is no support for 2-sided polys "+2000 means that the polygon is not to be culled on its back side. (Should work for 2.3 and prior, but is obsolete for trunk."). So we don't need to merge them on import because on export we will get a bugged model. I think there should be a button to deselect merging on import.

Safety0ff commented 12 years ago

As discussed on IRC, it seems the issue is that scientific notation doesn't mix well with wz (probably due to the float-> int conversion code). The easy solution is to use ostream::setf to set the floatfield flag to std::fixed, and ostream::precision in the aPieModel::write and WZM::write functions.

inodlite commented 12 years ago

Shouldn't be a problem now, as points are considered different if their normals differs.