WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-26-2008, 09:13 PM
znchb znchb is offline
Member
 
Join Date: Sep 2008
Posts: 21
Whether we can do like this? see the & the attached files

#some problems exist. if I use quad = viz.addTexQuad(), then I can not add #the 'billboard' to the scene. how to figure out this? Appreciate

import viz

viz.go()

####### Create surface to wrap the texture on
#quad = viz.addTexQuad()
#quad.setPosition([0, 1.5, 3]) #put quad in view
#quad.texture(viz.WHITE)
########create text object and make it a child of the texture quad
#text = viz.addText( 'message', quad )
#text.setScale(.1,.1,.1)
#text.alignment(viz.TEXT_CENTER_CENTER)
#text.color(viz.BLACK)
#text.setPosition(0,0,-.01)

#####press space bar to change message
#vizact.onkeydown(' ', text.message, "new message")

#####Whether we can do like this: ???
main = viz.add('c:\\VirtualWorlds\\table\\poolTableScene. 3DS') # the main scene
billboard = main.getChild('billboards') # object, named 'billboards', component of 'poolTableScene.3DS'

#quad = billboard.addTexQuad()

quad.setPosition([0, 1.5, 3])

quad.texture(viz.WHITE)

text = viz.addText('message', quad)
text.setScale(0.2,0.2,0.2)
text.alignment(viz.TEXT_CENTER_CENTER)
text.color(viz.BLACK)
text.setPosition(0,0,-.01)

vizact.onkeydown(' ', text.message, "new message")
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 11:46 PM.


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