WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-16-2011, 04:51 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The following code shows how to use a cluster mask so the sub-window only shows up on the master:
Code:
import viz
viz.go()

maze = viz.addChild('maze.osgb')


with viz.cluster.MaskedContext(viz.MASTER):
	UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
	UpperLeftWindow.visible(0,viz.SCREEN)
	BirdView = viz.addView()
	#Attach the bird's eye view to the upper left window
	UpperLeftWindow.setView(BirdView)
	#Move the view above the center of the room
	BirdView.setPosition([0,50,0])
	#Rotate the view so that it looks down
	BirdView.setEuler([0,90,0])
Reply With Quote
  #2  
Old 12-13-2011, 02:15 AM
Andy Andy is offline
Member
 
Join Date: Mar 2008
Location: Germany
Posts: 36
I get an error if I try to set the MaskedContext to viz.CLIENT1 can you tell me why? I think the VizWindow instance isn't valid.
Reply With Quote
  #3  
Old 12-13-2011, 12:03 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The previous code sample is incorrect. Try the following instead:
Code:
import viz
viz.go()

maze = viz.addChild('maze.osgb')

UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
UpperLeftWindow.visible(0,viz.SCREEN)
BirdView = viz.addView()
#Attach the bird's eye view to the upper left window
UpperLeftWindow.setView(BirdView)
#Move the view above the center of the room
BirdView.setPosition([0,50,0])
#Rotate the view so that it looks down
BirdView.setEuler([0,90,0])
	
# Show the window only on client 1
UpperLeftWindow.visible(0)
with viz.cluster.MaskedContext(viz.CLIENT1):
	UpperLeftWindow.visible(1)
You still need to add the window to all machines, but just make it visible on one.
Reply With Quote
Reply

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
Question about cluster replacement mizutani_jun Vizard 1 02-18-2011 02:49 PM
Question about GUI and CLUSTER mizutani_jun Vizard 2 01-02-2011 03:35 PM
Tiling in a cluster setting vijaykiran Vizard 5 10-30-2009 11:41 AM
Cluster Help videcuk Vizard 12 09-21-2007 02:14 PM
quad_buffer cluster John P Vizard 4 06-07-2006 10:01 PM


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


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