WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-25-2008, 05:20 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Quote:
So one fundamental difference is that during playback you use a node3d object to link to the cave (cave.setTracker and vizcave.CaveView), and then change that node's position, whereas I use cave.update and viz.MainView.setPosition directly. Aside from personal preference is there any performance reason to do this one way or the other?
There is not major performance reason. The biggest reason is to reduce the amount of code. Your method uses two different code paths to update the cave, depending on whether you are recording or playing data.

Quote:
A more minor difference is that during playback you yield on None after each position update, whereas I yield on viztask.waitDraw(). What is the difference between these approaches, and which would ensure that each frame of the playback was identical to the recorded frames?
I would not use viztask.waitDraw unless you are interested in the time that the frame is drawn to screen. If you don't care about the time, then I highly recommend using viztask.waitFrame(), or just yield None.

Quote:
Finally, and this perhaps is not a difference at all, you use vizact.onupdate, while I use viz.callback(viz.UPDATE_EVENT). Is there a reason to prefer one command over the other, or are they completely identical?
I generally recommend using the vizact module instead of using viz.callback. Using viz.callback might break your code in certain cases, because only one function can be registered at a time with viz.callback. So if you end up using it in multiple parts of your script you might end up inadvertently unregistering an update callback.
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 04:17 AM.


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