
Wed, 12/28/2022 - 11:07
Forums:
I want to get the position of the center of the coordinate axis relative to the screen ( in pixels ) in order to always zoom my camera not to the center of the screen, but to the center of the coordinate axis, where my displayed model is located. Aspect_ScrollDelta takes zoom point coordinates based on the screen, so as I move my camera in 3d viewer, the center of the coordinate axis does not change its location in 3d space, but it changes the location in screen space. The main topic of the question is: how to always zoom camera to position where the displayed model is located (the center of the coordinate axis)?
Thu, 12/29/2022 - 10:42
As for 'how to convert 3d point to screen pixel coordinates' - V3d_View class provides Convert and Project methods, and Graphic3d_Camera interface might be also useful.