07-08-2009 09:03 AM
05-27-2017 01:49 PM
I have the same question:
How can I get the position and orientation of a 3D object in a scene.
The get rotation and get translation returns the local values, but not the global values.
How can I obtain the global values?
05-28-2017 09:12 PM
You can either maintain your own dictionary of parent-child relationships or use the "Get Object" method recursively from the top-level scene object to determine them. Then you have to multiply the 4x4 Transformation matrices for each level down and from there you can extract the global scale, rotation and translation. I believe the rotation order of the constituent homogenous matrices is Translation, Scale, Rotation.
05-29-2017 12:42 AM
Of course I can do all the maths again, but it would make sense that the drawing routines have already done this, and know exactly where it has drawn the object.
I understand from your solution that you do not believe that LabView exposes this information.... can this be true?
05-29-2017 12:56 AM
I believe that LabVIEW simply reports the object properties, and global orientation/position is not a property of the object, but an end product of the parent object transformations. I am not sure LabVIEW does know where the object is - OpenSceneGraph handles the drawing and sends it to the graphics card. It is a very simple interface that has some decent challenges associated with it. There is no direct way of determining the parent object, for example.