WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-21-2008, 09:19 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I would highly recommend using the viztask module to control the flow of your program. Each stage would be implemented as a task and the main function would just yield each stage one after the other:
Code:
def stage1():
    while SomeCondition:
        
        #Do something each frame here

        #Wait for next frame
        yield None

def stage2():
    while SomeCondition:
        
        #Do something each frame here

        #Wait for next frame
        yield None

def main():
    #Execute stage 1 and wait for it to finish
    yield stage1()
    #Execute stage 2 and wait for it to finish
    yield stage2()

viztask.schedule(main())
There are a lot of examples in the docs showing how to use the viztask module. You can also ask here on the forum if you have more specific questions about it.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
switching between scenes david Vizard 4 07-01-2003 06:05 PM


All times are GMT -7. The time now is 01:39 AM.


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