Tuesday, May 3, 2011

Current Progress: Adding One More Function

We are now adding one more function for a special situation: when some segments of both silhouettes are exactly horizontal or vertical, the plugin cannot construct some facets because there is no plane that both of the facets can be projected to. So we have to design a separate algorithm for this situation.

One tricky bug is the value of sizeof().
The return type is unsigned, so 0 - 1 will be pow(2, 32) - 1, but not -1.
Instead of using i < ( vector.sizeof() - 1 ), we should use i + 1 < vector.size()

Cheers

No comments:

Post a Comment