View Single Post
  #1  
Old 07-08-2014, 01:51 PM
derek derek is offline
Member
 
Join Date: Jul 2014
Posts: 1
Vizard exits full screen after 30 seconds

I have this script that's modeled after one of Vizard's samples. It launches in full screen. But consistently after 30 seconds it reduces down to about 75% of full screen. While it currently runs in boarder-less mode, when there were boarders, after it reduced in size, the icon for changing window size remained the same. So there was only the option to reduce it even further. From this point if I then clicked full screen, it would expand only out to the 75% mark and not fill my entire screen. I could not manually drag it beyond this point either. What's going on?!

import viz
import vizcave
import viztracker

# Declare constants defining the CAVE dimensions
W = 2.289
H = 2.07
CL = 0.686 #2.25
D = 1.524
W2 = W/2.0
C0 = -W2,H,D-W # Front Wall: C1,C2,C5,C6
C1 = -W2,H,D # Left Wall: C0,C1,C4,C5
C2 = W2,H,D # Right Wall: C2,C3,C6,C7
C3 = W2,H,D-W
C4 = -W2,CL,D-W
C5 = -W2,CL,D
C6 = W2,CL,D
C7 = W2,CL,D-W

#Create front wall
FrontWall = vizcave.Wall( upperLeft=C1,
upperRight=C2,
lowerLeft=C5,
lowerRight=C6,
name='Front Wall' )

#Create left wall
LeftWall = vizcave.Wall( upperLeft=C0,
upperRight=C1,
lowerLeft=C4,
lowerRight=C5,
name='Left Wall' )

#Stereo mode to use for cave
STEREO_MODE = viz.QUAD_BUFFER




#Create cave object
cave = vizcave.Cave(stereo=STEREO_MODE)

#Size of each window
WINDOW_SIZE = [1.0/2.0,1.0]




#Add each wall
frontWindow = viz.MainWindow
frontWindow.setSize(WINDOW_SIZE)
frontWindow.setPosition([1.0/2.0,1])
cave.addWall(FrontWall,window=frontWindow)

leftWindow = viz.addWindow(size=WINDOW_SIZE,pos=[0,1])
cave.addWall(LeftWall,window=leftWindow)


"""
Create tracker object that represents the users head position, specifically the center of the eyes.
The position provided by the head tracker must be in the same reference frame as the cave wall coordinates.
This will normally be a tracking sensor, but for this example we will simulate a head tracker
using the keyboard (WASD keys).
"""
head_tracker = viztracker.Keyboard6DOF()
head_tracker.setPosition (0.0,1.8,0.0)

"""
Pass the head tracker to the cave object so it can automatically update the
view frustums every frame based on the current head position relative to each wall.
"""
cave.setTracker(head_tracker)

"""
Create CaveView object for manipulating the virtual viewpoint.
cave_origin is a node that controls the position of the cave within the virtual world.
For example, if you wanted to simulate the cave user flying through an environment,
you would apply the transformation to the cave_origin node.
"""
cave_origin = vizcave.CaveView(head_tracker)

"""
The cave_origin node is a standard Vizard node that you can apply any position/rotation to.
In this example we will create a keyboard/mouse tracker (using arrow keys) and link it to
the cave_origin node, allowing us to fly the cave user through the virtual environment.
"""
origin_tracker = viztracker.KeyboardMouse6DOF()
origin_link = viz.link(origin_tracker, cave_origin)

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



"""
Create tracker object that represents the users head position, specifically the center of the eyes.
The position provided by the head tracker must be in the same reference frame as the cave wall coordinates.
This will normally be a tracking sensor, but for this example we will simulate a head tracker
using the keyboard (WASD keys).
"""
head_tracker = viztracker.Keyboard6DOF()
head_tracker.setPosition (0.0,1.8,0.0)

"""
Pass the head tracker to the cave object so it can automatically update the
view frustums every frame based on the current head position relative to each wall.
"""
cave.setTracker(head_tracker)

"""
Create CaveView object for manipulating the virtual viewpoint.
cave_origin is a node that controls the position of the cave within the virtual world.
For example, if you wanted to simulate the cave user flying through an environment,
you would apply the transformation to the cave_origin node.
"""
cave_origin = vizcave.CaveView(head_tracker)

"""
The cave_origin node is a standard Vizard node that you can apply any position/rotation to.
In this example we will create a keyboard/mouse tracker (using arrow keys) and link it to
the cave_origin node, allowing us to fly the cave user through the virtual environment.
"""
origin_tracker = viztracker.KeyboardMouse6DOF()
origin_link = viz.link(origin_tracker, cave_origin)

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

#Initialize graphics window
viz.window.setBorder(viz.BORDER_NONE)
viz.window.setPosition(0,0)
viz.window.setSize(1280*2,720)
viz.go( )
Reply With Quote