Constant screen size object

Technical discussions
Post Reply
SyWind
Posts: 4
Joined: Tue Jan 15, 2019 9:00 pm

Constant screen size object

Post by SyWind »

Hi
I need to keep one of my objects of constant size which does not change on zoom. Is there a way to do it in DG Kernel?
Thank you

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

Re: Constant screen size object

Post by Prashant Kande »

Hello

I assume the object and the rest of the scene are 3D?

Do you need it to be aligned to the screen? I mean does it have to stay at fixed orientation relative to the imaginable plane of the screen or you need to be able to view it from all sides?

Regards

SyWind
Posts: 4
Joined: Tue Jan 15, 2019 9:00 pm

Re: Constant screen size object

Post by SyWind »

Hi Prashant
Thankyou for answering
I need it to be normal 3D object to view from any side like others, but it should scale up relatively to the rest when the user zooms out to keep it approximately, say 1/10 of the window height

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

Re: Constant screen size object

Post by Prashant Kande »

For normal 3D the only option is to resize the object in your code.

Use IView_DG.GetPixelSize() http://www.dynoinsight.com/Help/V6_0/In ... tPixelSize to map screen size to 3D geometric size.

I would do it in mouse up handler for performance. it would be jerky to do it on every mouse move event. There is a possibility we could smooth it out on our side. Get in touch if it is critical

Cheers

SyWind
Posts: 4
Joined: Tue Jan 15, 2019 9:00 pm

Re: Constant screen size object

Post by SyWind »

Thank you!
I will get going with that

Post Reply