Monday, July 24, 2006

Right dissapeared at the end of last week due to lack of ait conditioning and an enthusiastic dentist who decided it would be better to remove four teeth than two...

First up concave tesselation. Basically it works!:



Got stuck on some borderline cases tho. Spent a while looking at it....

... then I got fed up with all that I went on a leak hunt. I found a couple of cases where hashtables of geometry (so that when you click on something we can select the correct waterfall) weren't emptied. This ment 100's of megabytes of geometry that wasn't removed from memory. Creating multiple cities would bring my modest machine to its knees. Tis much better this way.
You can get memory leaks in Java!.




For future reference this is the best way i've found to clear up after a JMonkey swing window. Not sure its leak proof, but isn't too bad:


protected void onQuit()
{
renderer.setCamera(null);

ListIterator lit = rootNode.getChildren().listIterator();
while (lit.hasNext()) lit.next(); lit.remove();

rootNode.removeFromParent();

// the might be to blame for inter-display reactions? (also in MagicWindowMonkey)
display.getDisplaySystem().close();
display.getRenderer().clearVBOCache();
display.close();

renderer.clearQueue();
renderer.clearVBOCache();

for (Texture t: textures)TextureManager.releaseTexture(t);
TextureManager.clearCache();


eventDispatch = null;
geometryToWaterfall = null;
geometryToInPlug = null;
geometryToOutPlug = null;
toUpdate = null;
}

Next up was some more bug fixing on the Straight Skeleton:
  • If there are still incompleted parts of the puzzle/points still to be processed - these are disguarded, and the appropriate edges added to the output. We might get these edges on a symetrical shape where one point is left between two edge collided pairs on either side.
  • Secondly the steepness of parallel lines' bisectors examined. I think (this should be proved by someone with better abstract thought than me) that more than two fast bisectors cannot co-exist in one active list (see inset)/


No comments:

Post a Comment