WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Head tracking logging & realtime data (https://forum.worldviz.com/showthread.php?t=1187)

tmcw 08-17-2007 09:55 AM

Head tracking logging & realtime data
 
Hi, two questions -

First off, with the work we'll be doing, it'll be useful if we can keep track of where the person is and where their head is pointed during the trial. What's the best way to do this? If it doesn't exist specifically, I can write the code, but I can't figure out where to start.

Also, is it possible to get head position & rotation data during a simulation, and to make the simulation itself transparent (as in, the person sees the computer desktop instead of the 3D visualization). I ask because I'm thinking about writing the necessary mouse control and connector code to make a sort of VR interface to Google Earth and/or Street View, or something of that sort.

Thanks for any help!

farshizzo 08-17-2007 10:08 AM

Do you want to track the physical position/rotation of the users head, or the virtual (viewpoint) position/rotation? Either way, your code would look something like this:
Code:

#Can be main view or tracking sensor
head = viz.MainView

def GetHeadInfo():
        pos = head.getPosition()
        euler = head.getEuler()
       
        #Do something with pos/euler data
       
vizact.ontimer(0,GetHeadInfo)

You can either completely hide the Vizard window, or minimize it. Here is some code that can do both
Code:

import win32gui
SW_HIDE = 0
SW_MINIMIZE = 6

#This will completely hide the window
win32gui.ShowWindow(viz.window.getHandle(),SW_HIDE)

#This will just minimize the window to the task bar
win32gui.ShowWindow(viz.window.getHandle(),SW_MINIMIZE)


tmcw 08-18-2007 10:31 AM

Great, thanks!


All times are GMT -7. The time now is 05:53 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC