WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-20-2009, 10:05 PM
Brett Lindberg Brett Lindberg is offline
Member
 
Join Date: Jul 2008
Posts: 18
I hacked my way around and came up with this: draws 40 windows across the top of the window. I could render to texture, and make one window, but would that be a lot better?

Code:
import viz
import math

class PanoWindowGroup:
	def __init__(self, SubWins=40, windowHeight=0.3, vertFOV=90):

		
		self.numSubWins = SubWins
		
		self.winHeight = windowHeight
	
		self.winFOV = 360.0/self.numSubWins
		
		self.vFOV=vertFOV
		self.sizeRat = 1.0/self.numSubWins
		
		self.size = (self.sizeRat, self.winHeight)
		
		self.subWinArr = []

#experimentally derived sub-window FOV ratio:		
#		self.subWinFOVrat =  4.3015/(pow(self.numSubWins,1.113))
		
		for i in range(self.numSubWins):
			scrPos = ((i*self.sizeRat),1.0)
			direction = i*self.winFOV-60.0
			print "Direction= ", direction
			subWin = PanoSubWindow(scrPos, self.size, direction, self.winFOV, self.vFOV, self.subWinFOVrat )
			self.subWinArr.append(subWin)


class PanoSubWindow:
	

	def __init__(self, scrPos, sizer, direction, winFOV, vFOV, sWFR, viewPos=[0,0,0]):	
		print "Inputs: ", "scrPos= ", scrPos, " sizer= ", sizer, "direction= ",direction, "winFOV= ", winFOV, "vFOV= ", vFOV
		self.vFOV = vFOV
		self.size = sizer
		self.subwindow = viz.addWindow(pos=scrPos, size=sizer)
		self.subwindow.visible(0, viz.SCREEN)
		self.subWinFOVrat = sWFR

		self.subview = viz.addView()
		self.subview.setPosition(viewPos)

		self.subview.setEuler([direction,0,0])
		self.subwindow.setView(self.subview)

#		self.subwindow.fov(self.vFOV, self.subWinFOVrat)
		self.subwindow.fov(self.vFOV, 0.075)
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
View nlfrnassimi Vizard 0 03-17-2009 03:01 AM
View nlfrnassimi Vizard 4 03-12-2009 06:25 AM
problem with stereo mode shivanangel Vizard 3 10-17-2006 10:58 AM
keeping a 3d object in front of the view tavaksai Vizard 1 07-07-2004 10:33 AM
SEOS HMD 120/67 compatability John Vizard 18 05-28-2004 12:13 PM


All times are GMT -7. The time now is 08:01 PM.


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