Thu, 02/29/2024 - 17:42
Forums:
Hello community.
Today, I'm trying to create a custom manipulator and I'd like to know if there is a way to project a 2D point (mouse position) to a 3D point that is on a specific plane (using gp_Pln for example) regardless of the camera eye direction.
I know the "Convert" function of the view but there is nothing to convert the 2D point on a custom plane.
Thank you for your answers ;)
Fri, 03/01/2024 - 09:58
What do you mean 'project 2D point on the screen to 3D space regardless camera eye direction'? That makes no sense to me - camera eye direction and vertical axis are defining the very coordinates system of this 2D space relative to 3D space.
Fri, 03/01/2024 - 11:36
Thank you and sorry for my bad explaination.
I have a 3D view. On this view, I have a virtual 3D plane defined by a point and its normal.
I'd just like to know where is my mouse cursor on this plane, using the mouse coordinates and the plane definition (using a gp_Pln for example).
Fri, 03/01/2024 - 12:05
You may use
IntAna_IntConicQuad
to find intersection between linegp_Line
and planegp_Pln
.Or you may use picking information, if your plane is defined by AIS interactive object.
Fri, 03/01/2024 - 12:31
My plane is virtual and there is no interactive object to define it, but I'm interest on how to do that :)