Combined Image and BBTree
Not sure if this is helpful to you, but I have code for combining the BBTree and ImageShaper in my fork. It's in C# though...
I'm not sure I like needing to pass the BBTree for the word into the Nudger/Placers, but this does allow nicer collisions (angled words fit into the shape better rather than using the rectangle bounding box for collision), and had a nice speed boost over the default .Net "shape" collision stuff. I don't know what the performance of the Java shapes are, so it may not be helpful there.
Also there are unit tests for the BBTree.Contains method which may be helpful.
Hah! Why is it in C#? I don't mind, I can read & write both of them. Paste it here in a comment, maybe? or a gist link? I'll take a look.
Why C#? Because. <_<
cough
https://gist.github.com/Xeio/6879334
Oh, and unit tests, though they may be less clean to port:
https://github.com/Xeio/WordCramSharp/blob/master/WordCram/WordCramTest/BBTreeContainsTest.cs
Incredible, thank you! I'll take a closer look as soon as I have some time.
I'm feeling some lambda-envy over here! Proper generics are nice, too, though I don't lean on generics much in WordCram.
On Tue, Oct 8, 2013 at 12:10 AM, Joshua Shaffer [email protected]:
Why C#? Because. <_<
cough
https://gist.github.com/Xeio/6879334
— Reply to this email directly or view it on GitHubhttps://github.com/danbernier/WordCram/issues/44#issuecomment-25863745 .
twitter @danbernier http://wordcram.org | http://newhavenrb.org