Example Code

3d Cursor in a 3d Picture Control.

Code and Documents

Attachment

Overview

This example shows how to create a cursor in a 3d picture control. This can accomplished fairly easily using property and invoke nodes with a 3d graph, however in a 3d picture control we need to be a bit more creative.

Description

In this VI, three cylinder objects are created and offset 90 degrees to each other in each axis so they produce a 3d crosshair. This is then moved about the scene using absolute transforms which are controlled by controls on the front panel. The camera is also controlled in this way and always oriented and targeted at the origin of the crosshair.

Steps to Run Code

1) Open 3dCursor.vi.

  2) Run VI.

Requirements

Software:

LabVIEW 2013

Hardware:

None

VI Snippet

3dCursorSnippet.png

James Kent | Applications Engineer | National Instruments UK & Ireland
w: uk.ni.com | ireland.ni.com

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors