-
Notifications
You must be signed in to change notification settings - Fork 647
Misc. collision stuff #2585
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
base: main
Are you sure you want to change the base?
Misc. collision stuff #2585
Conversation
|
forgot your license comment here |
| static Linef planeIntersectSeg; | ||
|
|
||
| Vec3f sp34; // unused | ||
| Vec3f _point; // discarded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont do leading underscore for "discarded" arguments anywhere else. it goes against our convention, I dont want to introduce it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe instead of closestPoint and point it should be planePoint and linePoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cadmic can you or someone else explain your reasoning to me? I'm trying to wrap my head around the bigger picture what these two functions are doing because it could help name two functions in bgcheck:
Math3D_PlaneVsPlaneVsLineClosestPoint
Math3D_PlaneVsLineSegClosestPoint
Like to me, it seems like Math3D_PlaneVsLineSegClosestPoint should be named PlaneVsPlane as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The planePoint/linePoint comment was solely based on reading // closestPoint is a point on planeIntersect, sp34 is a point on linePointA, linePointB
But, looking at it harder, I think the comment on Math3D_PlaneVsPlaneVsLineClosestPoint is accurate, but Math3D_PlaneVsLineSegClosestPoint is actually comparing with a "line", not a "line segment". I'd suggest something like the following names:
Math3D_PlaneVsPlaneNewLine -> Math3D_PlaneIntersect
Math3D_PlaneVsPlaneVsLineClosestPoint -> Math3D_PlaneIntersectVsPoint
Math3D_PlaneVsLineSegClosestPoint -> Math3D_PlaneIntersectVsLine
Here PlaneIntersect means the line formed by the intersection of two planes. I didn't want to use Vs because I think that made Math3D_PlaneIntersectVsPoint and Math3D_PlaneIntersectVsLine too confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if we want to be fully consistent about removing "ClosestPoint", there should be these renames too:
Math3D_LineClosestToPoint -> Math3D_LineVsPoint
Math3D_LineVsLineClosestTwoPoints -> Math3D_LineVsLine
the idea being that "vs" means any comparison, not necessarily and intersection test
| static Linef planeIntersectSeg; | ||
|
|
||
| Vec3f sp34; // unused | ||
| Vec3f _point; // discarded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe instead of closestPoint and point it should be planePoint and linePoint?
No description provided.