#1
|
|||
|
|||
vizppt.dls
In the code below, what do lines 4 and 5 mean? What are the significance of the numbers and the positions of those numbers? Why is it (4.002) and why (5,",5)? How/why do they affect the last line (12), viz.eyesight(1.7)?
1 if viz.get(viz.TRACKER): 2 v = viz.add('intersense.dls') 3 pos = viz.add('vizppt.dls') 4 pos.command(4.002) 5 pos.command(5,'',5) 6 viz.tracker() 7 v.reset() 8 tracking = 1 9 else: 10 tracking = 0 11 12 viz.eyeheight(1.7) Jeb |
#2
|
|||
|
|||
Hi Jeb,
Line 4 is telling the ppt to scale the incoming position values by 2 Line 5 is telling the ppt to average the position values over the last 5 samples. Line 4 will affect line 12 because the y value of the ppt will be scaled by a factor of 2, so the height of the viewer will be taller. Here's a list of all the available ppt commands. Let me know if you have any more questions. PPT Commands 3 - Set the scale factor for each axis. ppt.command(3,'',2,1,2) #Scale x and z axis by 2, but leave y axis alone 4 - Set the scale factor for all axis. ppt.command(4.002) #Scale position value by 2 5 - Average position value by given number of samples ppt.command(5,'',3) #Average position over previous 3 samples 6 - Set the reset mask for each axis ppt.command(6,'',0,1,0) #Reseting ppt will only reset the y axis 7 - Manually set the offset for the ppt ppt.command(7,'',2,0,3) #Set the virtual center of the ppt at (2,0,3) |
|
|