Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combined Image and BBTree #44

Open
Xeio opened this issue Sep 13, 2013 · 3 comments
Open

Combined Image and BBTree #44

Xeio opened this issue Sep 13, 2013 · 3 comments

Comments

@Xeio
Copy link

Xeio commented Sep 13, 2013

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.

@danbernier
Copy link
Owner

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.

@Xeio
Copy link
Author

Xeio commented Oct 8, 2013

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

@danbernier
Copy link
Owner

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//issues/44#issuecomment-25863745
.

twitter @danbernier
http://wordcram.org | http://newhavenrb.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants