![]() |
|
#1
|
|||
|
|||
|
setHUD example
I am working on an application that having a HUD would be a useful feature. Is there an existing example of how to set up and draw to a renderNode object that has been set up as a HUD? I have briefly searched the online articles and the examples provided with Vizard 4, but I haven't come across anything useful yet.
__________________
|
|
#2
|
|||
|
|||
|
It may also be possible that this is not what I want to do.
Alternatively, I would like to Draw another 3D object on the fly in the center of a new scene. Render that scene to a texture, and display that texture on a quad that is drawn orthographically.
__________________
|
|
#3
|
|||
|
|||
|
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))
|
|
#4
|
|||
|
|||
|
I think this is what I'm looking for. Thank you.
__________________
|
![]() |
|
|