Thread: cave distortion
View Single Post
  #4  
Old 08-25-2017, 11:40 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you set the head tracker of the CAVE to a fixed position there will be no updates to the projection matrices. You can still move the CAVE origin around. Here's an example using the powerwall script:

Code:
'''
Use arrow keys and mouse
to move the viewpoint
'''

import viz
import vizcave
import viztracker
import vizinfo

viz.go()
vizinfo.InfoPanel()

#Dimension of PowerWall in meters
WIDTH       = 3.0
HEIGHT      = 3.0
DISTANCE    = 2.0

#Create single power wall
PowerWall = vizcave.Wall(   upperLeft=(-WIDTH/2.0,HEIGHT,DISTANCE),
						 upperRight=(WIDTH/2.0,HEIGHT,DISTANCE),
						 lowerLeft=(-WIDTH/2.0,0.0,DISTANCE),
						 lowerRight=(WIDTH/2.0,0.0,DISTANCE),
						 name='Power Wall' )

cave = vizcave.Cave()
cave.addWall(PowerWall)

# Set a fixed position for the cave tracker
head_tracker = viz.addGroup(pos=[0,1.8,0])
cave.setTracker(head_tracker)

cave_origin = vizcave.CaveView(head_tracker)
origin_tracker = viztracker.KeyboardMouse6DOF()
origin_link = viz.link(origin_tracker, cave_origin)

#Add gallery environment model
viz.add('gallery.osgb')
Reply With Quote