Replies: 1 comment 1 reply
-
Have a look into PolytopeIntersector.cpp and you will understand how screen values (xMin, xMax, yMin, yMax) turn into polytope points: To construct your own polytope, consider add planes instead of points, and use correct CoordinateFrame |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to create a Polytope from a series of points on the screen ( a convex screen polygon) to pass to the PolytopeIntersector.
I have no issues using the simplified screen rectangle constructor to PolytopeIntersector ( as per the osg examples) but using a convex general screen polygon has eluded me.
For example this 'picker' works as expected where the screen coordinates are normalized
I am unable to construct a polytope that works using nominally the same 4 points (used to create 4 planes)
Looking in the debugger, the planes of the polytope seem close to the ones built in the other simplified constructor
Beta Was this translation helpful? Give feedback.
All reactions