PDA

View Full Version : World/Origin Shifting and Rotation


byronhulcher
08-11-2010, 07:41 AM
Hello, I'm creating a project using Vizard 3.18 for human reaction testing. However, our lab is quite small, and we need to make maximum use of the space. To this end, I'm trying to shift the origin of our world within environment a few meters and rotate the x and z axes by approximately 45 degrees to take advantage of additional diagonal space. Is there an easy command to do this, or am I stuck applying this transformation to every object I add into the world?

byronhulcher
08-11-2010, 07:49 AM
I've recently discovered the HMD.__init__ function within vizhmd.py which is extended by nvis.py, which my program is currently using to access the HMD. However, I'm not really sure how to use this to apply changes.

byronhulcher
08-11-2010, 08:11 AM
Actually, I think I'm better off using the viz.link functions, if I'm reading the WorldViz documentation correctly. Does anyone have experience with these?

Jeff
08-11-2010, 10:14 AM
Do you want to offset the viewpoint linked to tracking data? If so, take a look at the following code. Using the <link>.postTrans and <link>postEuler operators, the viewpoint is offset 1 meter in height and 45 degrees in yaw from the tracking data.
link = viz.link(tracker,viz.MainView)
link.postTrans([0,1,0])
link.postEuler([45,0,0])

c4am95
10-26-2010, 01:48 PM
what if you're not using an HMD? i'm having a similar issue, but for testing purposes i can't use these methods to apply world transformation (there's no link). what could you do to rotate the world/translate the origin without the link?