LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D picture controll + CTRL + SHIFT keys

Hello dear LV users,

 

I am using 3d picture to display some data, by default when we press and move a mouse around the control it will rotate the camera, we can press CTRL or SHIFT to change that to zoom or move.

 

I will display data on a touchscreen and I want to have an option for the user to choose what to do, zoom, rotate or move.

Is there a programmatic way to do that? 

 

Last resort will be to try to use winapi and simulate keyboard inputs but I would like to avoid that.

Has anyone faced that problem? 

 

0 Kudos
Message 1 of 5
(2,911 Views)

Wow I'm a bit surprised.  My first instinct was to tell you to check the Visible Items, and see if there is something similar to the Graph Palette which has tools you can click, and then clicking and dragging would zoom in or out.  But 3D controls don't have this.  

 

The only thing I found that might be useful is a few property nodes.  One is the Graph >> User Defined View >> View Distance.  This can be read and written and is the zoom level.  You could make a slider that starts at the center, and sliding it zooms in and out.  As for positioning I'm not sure.  There is the View Latitude, and View Longitude but I think that can be used more for adjusting rotation.  I'm not sure if there are properties for adjusting the image by translating it.

0 Kudos
Message 2 of 5
(2,882 Views)

Thanks @Hooovahh for a reply and looking into this 🙂

 

On the low level, it is probably doable by translation/rotation matrix.  If I understand correctly 3d picture is a high-level wrapper around OpenGL , but since there is no documentation at all for this specific module for someone who knows nothing about 3d graphic/scenes/rendering and that kind of stuff I would like to avoid big time waste and not dig into that.

 

I was thinking if this functionality is available inside 3D control it should be a way to expose it for the user.

 

 

0 Kudos
Message 3 of 5
(2,878 Views)

One of these two links may help you.

 

Link #1

 

Link#2

 

The thing you are looking for is the ModelViewMatrix

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,871 Views)

I made this a long time ago.  You might find it helpful.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 5 of 5
(2,843 Views)