|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
How can you dynamically change the gain on a tracker-based CaveView?
I'm using a setup with a PowerWall and head-tracker. I currently have the view linked to the tracker with:
Code:
cave.setTracker(pos=tracker,ori=tracker) view = vizcave.CaveView(tracker) Now I want to be able to dynamically change the gain on the tracker position, so that in one segment of the program the frustum and view are updated based on the raw tracker position, while in a different segment the frustum and view are updated based on a magnification of the actual tracker position. In this way the user could be shown virtually what it would be like to be larger (e.g., how quickly their view would change if their stride were twice as long). To do this, do I need code like: Code:
viz.callback(viz.UPDATE_EVENT,onUpdate) def onUpdate(event): view.setPosition(magnifyPosition(view.getPosition())) cave.update(pos=magnifyPosition(tracker.getPosition()),ori=tracker.getQuat()) |
#2
|
|||
|
|||
If you are applying a uniform gain to the data, then you can use the filter plugin. Here is sample code that creates a tracker object with a 2x gain in the x,z axis:
Code:
filter = viz.add('filter.dle') magnifiedTracker = filter.position(tracker,scale=(2,1,2)) view = vizcave.CaveView(magnifiedTracker) |
#3
|
|||
|
|||
Ah ... perfect. Thank you! Knew you would have a better solution than I.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Randomly and Continuously Change Avatar's Face Texture | Karla | Vizard | 4 | 08-22-2008 12:14 PM |