WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-13-2013, 04:11 PM
javadi javadi is offline
Member
 
Join Date: Mar 2013
Location: London
Posts: 33
Hi Frank

Thanks for your detailed response. Here it is a sample code,

Code:
import viz

#viz.setOption('viz.fullscreen', '1')

viz.go()

[WindowWidth, WindowHeight] = viz.window.getSize()

SignSize 	=  WindowWidth * 0.0625
SignCentre 	= [WindowWidth / 2.0, WindowHeight / 2.0]
SignRadius 	=  WindowHeight / 4.0

...
As my model is extremely big and already pushing the computer to its extreme, I cannot keep an eye on the size of the window and readjust my measurements whenever it changes size.

Yes, the screen changes back to a 600 x 800 window after 30s when it is a Lite version. By then, I have adjusted everything and rendered the first screen.

This is a very basic query that one would expect from such applications to be able to support. For a work-around I have specified a flag at the beginning of my code to adjust the screen according to the computer. I might later change it to a more elaborated solution querying an identification ID such as MAC.

Thanks again for your suggestions.

Greetings
Amir
Reply With Quote
  #2  
Old 11-14-2013, 04:02 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
If I understand correctly, you want your code to handle different screen sizes, so that you can test your code on with a Lite license and a full license. Furthermore, you only seem to have a problem when the window size changes. So would your problem be solved when the window does not change size (as in a fixed size window, or fullscreen). If so, this code should help you out:
Code:
import viz
import viztask

viz.go(viz.FULLSCREEN)

def getSceenSize():
	yield viztask.waitDraw()
	[WindowWidth, WindowHeight] = viz.window.getSize()
	print WindowWidth
	print WindowHeight

viztask.schedule(getSceenSize)
The code first tries to go fullscreen. With a full license, WindowWidth & WindowHeight should be your screen resolution. With a Lite license, WindowWidth and WindowHeight should be the windowed resolution (standard 800 x 600). Furthermore, this screen does not change in size afterwards. Then, you could create SignSize, SignCentre, and SignRadius based on these values.
Reply With Quote
  #3  
Old 11-14-2013, 08:23 AM
javadi javadi is offline
Member
 
Join Date: Mar 2013
Location: London
Posts: 33
Hi,

Yes. Thanks.

Greetings
Amir
Reply With Quote
Reply


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


All times are GMT -7. The time now is 07:50 PM.


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