Smoothing is usually controlled through smoothing groups.
Smoothing groups are polygon/triangle based: every triangles have one or multiple smoothing group ID:s which control the vertex normal calculation: which triangle normals should be used for calculating the final interpolated vertex normal. The ID:s can be assigned in multiple ways (I guess every mayor 3D modelling applications support that), manually assigning values or "auto smooth" features with angle threshold.
It is important to note that .obj format doesn't support multiple smoothing group ID:s per triangle (or at least some exporters doesn't).
My approach is different: the automatic smoothing generation is edge based. That means in some cases the output of my algorithm and triangle/polygon based algorithms will differ even with the same angle threshold (see first image: the windows of the car).
This approach suits better the needs of a paper modeller, where some sharp edges are need to be perforated or etched before bending. These bend-edges are displayed too (see images below), and will affect the automatic unfolding feature. It will be possible to manually define bend-edges too.
The algorithm starts with simply detecting bend-edges (by the angle of the two side triangles), then comes the ugliest son-of-a-bitch hacked algorithm ever, it's such an ugly bitch that I even made a screenie about it:
It works nicely but in some degenerate cases it doesn't give good results (shared vertex but non-continuous surface), I'll deal with it some time...
See the screenshots with different angle thresholds below.
Some smaller stuff: I managed to use DevIL for loading images as textures, thanks for the posts in the other entry and Gaiiden for putting some focus on that entry!
Added "zoom to extent" feature, and vertex normal display (it's only useful for debugging the smoothing).
Replaced the jaw/pitch camera rotation to "arcball" rotation (or whatever it's called..).
Next: *sigh* selection and undo/redo *sigh*. I'll dig myself into Aardvajk's journal....
Maybe some refractoring too *sigh*