WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Cortex to Vizard (https://forum.worldviz.com/showthread.php?t=4561)

brunomartelli 04-28-2013 02:51 PM

Cortex to Vizard
 
Hi

Im trying to stream Cortex data to Vizard. I can do that - but I only get 1 frame. Can someone help me figure out how to get continuous frames. (sorry im not a programmer ) At the moment its putting a hedra on each marker - but just one frame.

thanks

PS here's what I have already:

import viz
import vizconfig
viz.go()

import vizcam
vizcam.PivotNavigate(center=[0,1,0],distance=10)

#Get CORTEX info
evart = viz.add('evart.dle',0,'127.0.0.1')
body1 = evart.getBody(0)

for x in range(40):
newhedra = viz.addChild('tut_hedra.wrl')
newhedra.setScale([0.1,0.1,0.1])
marker = body1.getMarker(x)
position = marker.getPosition()
newhedra.setPosition(position)

Jeff 05-02-2013 09:06 AM

You can link an object to the tracker:
Code:

viz.link(body1,newhedra)
Or you can update it manually each frame:
Code:

def updateHedra():
        marker = body1.getMarker(x)
        position = marker.getPosition()
        newhedra.setPosition(position)
       
vizact.onupdate(0,updateHedra)



All times are GMT -7. The time now is 11:37 PM.

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