WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-01-2012, 08:43 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use a sub window to render an arbitrary scene on top of the main window. Here is an example script that shows how. Let me know if I misunderstood your question.
Code:
import viz
import vizact
viz.go()

# Render model to main window
viz.add('dojo.osgb')

# Create sub window
window = viz.addWindow()
window.clearcolor(viz.GRAY)

# Uncomment this line to have a transparent background
#window.setClearMask(viz.GL_COLOR_BUFFER_BIT,viz.MASK_REMOVE)

# Create view/scene for sub window
view = viz.addView()
scene = viz.addScene()
view.setScene(scene)
window.setView(view)
view.setPosition([0,0,-2])
view.lookAt([0,0,0])

# Add model to sub window
model = viz.add('beachball.osgb',scene=scene)
model.addAction(vizact.spin(0,1,0,90))
Reply With Quote
 


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 12:00 AM.


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