Convert 3d point into window coordinate

Technical discussions
Post Reply
Bernard
Posts: 2
Joined: Wed Aug 07, 2013 1:41 am

Convert 3d point into window coordinate

Post 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

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Convert 3d point into window coordinate

Post 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

Bernard
Posts: 2
Joined: Wed Aug 07, 2013 1:41 am

Re: Convert 3d point into window coordinate

Post by Bernard »

Thanks a lot, Prashant
bernard

Post Reply