On 31/03/2017 at 08:27, xxxxxxxx wrote:
Hello plugincafe community
I have a GeUserArea where I render the viewport (with Software renderer) as bitmap. I want to insert an object into the scene when I click on the image in the GeUserArea.
The only thing I don't know is how to convert from my local coordinates to global. I have seen the Local2Global methods but they only apply to the Dialog/UserArea itself. Is there a way to do this?
Have a nice weekend!
On 03/04/2017 at 02:47, xxxxxxxx wrote:
in general the functions you are looking for are part of the BaseView class (BaseView.SW() and alike). You can get hold the BaseDraw (BaseView is derived thereof) via BaseDocument.GetRenderBaseDraw() or BaseDocument.GetActiveBaseDraw().
In C++ docs we have a manual on BaseView and BaseDraw with a small chapter on Transformations.
I see a potential problem with your dialog getting out of sync with the scene by the user changing for example the camera or the views. But this should be discussed in a different thread, if needed.
On 06/04/2017 at 10:21, xxxxxxxx wrote:
thanks for your reply!
There is just so much to learn about the docs I knew the BaseView /Draw classes but I dind't know they had those functions.
And yeah, I guess that would be a problem, but I'll figure something out. Working with messages and rerendering my view to the dialog would be the easiest way I guess.