Skip to content

Allow default boundary and capacity - #37

Merged
shiffman merged 7 commits into
CodingTrain:masterfrom
Dezzles:allow-default-boundary-and-capacity
Mar 3, 2019
Merged

Allow default boundary and capacity#37
shiffman merged 7 commits into
CodingTrain:masterfrom
Dezzles:allow-default-boundary-and-capacity

Conversation

@Dezzles

@DezzlesDezzles commented Mar 1, 2019

Copy link
Copy Markdown
Contributor

Added support for a static withDefault() function that will attempt to pull defaults from global variables
Updated the visualize_qtree example to take advantage of this
Also updated dependencies to remove known security vulnerabilities (See commit messages)

@shiffman

Copy link
Copy Markdown
Member

What if we call this something like create(). I do like this thinking, I think p5 beginners are pretty used to overloading? What if we allow something like:

QuadTree.create();// defaults but throws error message if no p5?QuadTree.create(x,y,w,h);// boundary with default capacityQuadTree.create(newRectangle(x,y,w,h),capacity);// for someone who wants full customization?

And maybe we should namespace everything? QuadTree.Rectangle, QuadTree.Boundary, etc.? Maybe just qt. or qt5. for short?

Thank you so so much fo taking a look at this!

@DezzlesDezzles mentioned this pull request Mar 3, 2019
@Dezzles

Copy link
Copy Markdown
ContributorAuthor

Made the updates to support multiple different create functions, getting to the point that I think some more solid documentation needs to get put together. I'll take a look at that later this week. Raised a new issue for the namespace item ( #38 )

@shiffmanshiffman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thank you!

@shiffman
shiffman merged commit df98be7 into CodingTrain:masterMar 3, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Dezzles@shiffman