Page 1 of 1

Convert 3d point into window coordinate

Posted: Mon May 25, 2020 1:31 am
by Bernard
Hi,

I am using dgkc 6.0 with VB.net

I would like to display a control at a specific coordinate (2d). I use a custom control that a i move with 2d coordinate.

The position of the control is computed from the position of an entity displayed in the view. So i have to convert the 3d position of the object into 2d screen coordinate. It's like making a projection of the 3d object from world coordinate to screen coordinate.

What is the right way to do that?

Regards

Re: Convert 3d point into window coordinate

Posted: Tue May 26, 2020 6:56 am
by Prashant Kande
Hi Bernard
Use IView_DG.ProjectToScreen() for that:
../Help/V6_0/Interface/View/IView_DG.aspx#ProjectToScreen


IView_DG is returned by the GetView() of the control (Cast the retuned interface to IView_DG).

Regards

Re: Convert 3d point into window coordinate

Posted: Wed May 27, 2020 3:52 am
by Bernard
Thanks a lot, Prashant
bernard