From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VRML import, center, and rotate critique

I was hoping to get some input on these VIs.  Is there a better way to do what is listed here?  For optimization I will probably take better advantage of the relative moves and keep track of changes in angles thereby not running as much code and not resetting the transformations.

 

My question is about the method of importing the Mario head VRML, locating it so that the relative rotate code will rotate about his neck, and finally, rotating the head.

 

Is there a way to set the axis for a relative rotate function rather than moving the 3D object?

 

I have attached all of the VIs and made a short youtube showing the program in operation.  Sorry for the focus!

 

http://www.youtube.com/watch?v=TUSKrRla-T4&feature=youtu.be

0 Kudos
Message 1 of 4
(2,477 Views)

Hi eissug,

 

The functionality of your project looks great based on the youtube video. Are you just looking into ways to possible make your code more efficient?

 

Below is some documentation about the rotate object vi, and this VI performs a relative rotation from the object's current position.

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvpict/rotate_object/

 

Please let me know if this is what you are looking for. Thanks!

Kevin S
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,439 Views)

I am using that VI by wiring true to the input of Rotate X-Axis.  The VI that you suggested, and I'm using, seems to rotate the object around the axis, not the center of the object.  The Set Rotation VI in the transformations pallette will rotate an object on its center, but it resets all other transformations.

 

I thought there must be a VI that rotates an object based on a set of coordinates.  Is there one?

 

And yes, I'm also looking for ways to make the code more efficient.

0 Kudos
Message 3 of 4
(2,408 Views)

I am looking at your VI, and cannot find the Rotate Object VI. The Rotate Object VI allows you to enter 3 coordinates to rotate around: x, y, and z. Once you specify 3 coordinates, this function allows you to rotate around a point, not an axis. You can specify this point of rotation to be the center of your object. I believe this will achieve the functionality you desire. Have you tried implementing this function in your code? If the code has changed since you first posted it, feel free to post the code here. Also, if the Rotate Object VI does not appear to have the functionality I described above, please let me know. Thanks!

Kevin S
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,384 Views)