ofxTriangle icon indicating copy to clipboard operation
ofxTriangle copied to clipboard

need a setup() / or constructor that sets inits some variables

Open ofZach opened this issue 12 years ago • 0 comments

nTriangles is set to 0 in clear() but nowhere else, so sometimes it has a bad default value and since the triangulate function never sets this to zero (it should, right?) the nTriangles count can be crazy.

in order to not crash or get good values back, I need to call:

TRI.clear();
TRI.triangulate(pts);

it might be fine to clear that in the constructor, or make a setup function, but it's not that obvious to call clear before the triangulate function.

ofZach avatar Nov 20 '12 14:11 ofZach