|CSG - Take One
||[Mar. 15th, 2008|05:11 am]
Spectre Gruedorf Challenge Blog
Clearly this challenge has unleashed some sort of a monster, for I have added CSG operations - union, intersection, difference - to the editor. With these, the realm of exciting concave objects is now a possibility.|
Consider the following screenshot for your pleasure. It still has some quirks - you can't actually intersect an object that is the result of a CSG operation with another CSG operation, which probably indicates either a typo or a Bad Dot Product. Doing so causes 'undefined behaviour', up to and including the brush you attempt to difference with suddenly turning inside out, nothing happening, and Happy Polygon Explosion Time. I make no attempt to do cleanup of the BSP data - which is bad! - so maybe there's some sort of a hidden floating point issue that I'm missing. There shouldn't be, though.
It does do texture coordinate generation correctly, though - which is nice.
Also added: extrusion of convex shapes. If you need a convex pentagon or hexagon or other convex thing and don't want to fire up Modo, you can now create it in-editor. Huzzah. Ideally this would be an arbitrary simple polygon (no holes), but I don't feel like finding my computational geometry textbook and writing a polygon triangulator.
Tomorrow: researching the combinatorial proof of Poincare Duality (which I sincerely hope is not related to my current issues!) and maybe fixing some bugs.
EDIT: No, our issues are related to T-junctions. Ugh, ugh, ugh, ugh, ugh, ugh.