Skip to content

fix rectangle normals #36

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

Merged
merged 3 commits into from
May 11, 2020
Merged

Conversation

ffreyer
Copy link
Collaborator

@ffreyer ffreyer commented May 10, 2020

I added extra coordinates to Rect3D. Now each face has its own set of coordinates, and normals act as surface normals.

@ffreyer
Copy link
Collaborator Author

ffreyer commented May 10, 2020

Btw, shouldn't minimum and maximum return the true minimum and maximum?
For example, with r = Rect3D(Poitn3f0(0), Vec3f0(-1)) you currently get minimum(r) = Vec3f0(0).

@SimonDanisch
Copy link
Member

Oh, good point :-O I guess, I kinda assume, you dont have negative widths... But then again, it's not enforced by the constructor!

@ffreyer
Copy link
Collaborator Author

ffreyer commented May 10, 2020

I think there are situations where it's convenient to use negative widths. Say you want to add a floor rectangle in some 3D plot. Then it's more convenient to write Rect3D(Point3f0(0), Vec3f0(1, 1, -0.2)) than Rect3D(Point3f0(0, 0, -0.2), Vec3f0(1, 1, 0.2)) imo.

@SimonDanisch
Copy link
Member

It is, but we may want to rewrite that in the constructor to still end up with positive widths, I suppose

@SimonDanisch SimonDanisch merged commit 415e484 into JuliaGeometry:master May 11, 2020
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

Successfully merging this pull request may close these issues.

2 participants