Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd 3D cuboid implementation #311
Conversation
|
Thanks for this PR! We plan to add a The rest of the changes look good to me (preferably with the commits squashed once we are good to go). |
f1f356a
to
4b38c06
|
I think this is ready to be merged. |
|
Thanks a lot for addressing the box representation. I apologize for requesting yet another round of changes. I filed #317 to discuss a way to more easily add opinionated names without making euclid incompatible with a lot of projects, not sure how popular the idea will be but I'd rather be conservative about names in the mean time. |
|
Sorry I didn't see the new commits arriving in this PR. I started writing a 2D equivalent by pretty much porting this over to 2D and spotted a couple of mistakes in the process. It'd be great if you could extract the side-offsets-related changes into a separate PR and squash the commits in this one. It looks almost ready to go. |
|
Sorry been a bit busy lately, I'll try getting on to it this week. |
Don't be! Take your time and thanks for putting up with me coming up with requests to change things a gazillion times. |
|
Guess this is ready... I'll make a new PR for the side offsets. |
|
Thanks! @bors-servo r+ |
|
|
Add 3D cuboid implementation Extends the library to add support for the 3D primitive `Cuboid`. Not sure if you intend this library to be mostly 2D only, but there is already some 3D support, so this is just a little extra - cuboids are pretty useful. Couldn't call this Box as it would conflict with rust's Box. I plan to use this for my own project later on. Tests are pending - I would like your feedback first (ok PR or not), then go from there. For the z-axis equivalent of (horizontal, vertical), I have called it applicate. This is what googling around suggested. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/311) <!-- Reviewable:end -->
|
|
Add TypedBox2D. This is the 2D equivalent of `TypedBox3D` introduced in #311. `TypedBox2D`'s endpoint representation is better suited for performing inclusion and intersection tests than `TypedRect` among other things. `TypedRect`'s origin + size representation might still be better for layout-ish things. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/320) <!-- Reviewable:end -->
marcosatti commentedDec 9, 2018
•
edited
Extends the library to add support for the 3D primitive
Cuboid. Not sure if you intend this library to be mostly 2D only, but there is already some 3D support, so this is just a little extra - cuboids are pretty useful. Couldn't call this Box as it would conflict with rust's Box.I plan to use this for my own project later on.
Tests are pending - I would like your feedback first (ok PR or not), then go from there.
For the z-axis equivalent of (horizontal, vertical), I have called it applicate. This is what googling around suggested.
This change is