PDA

View Full Version : hierarchicy with on-the-fly objects


jkelly
01-26-2005, 11:24 AM
I am interested in creating an on-the-fly object , and adding it to a hierarchy with a vrml object as the root. Is there a way to indicate in the viz.endlayer() command that it should be attached to an already-existing object? I tried the following:

myObject = viz.add('object.wrl')
viz.startlayer(viz.LINE_LOOP)
viz.vertex(0,0,0)
viz.vertex(0,1,0)
myLine = viz.endlayer(myObject)

This did not work, however. Can you suggest a better way to do this? Thanks.

farshizzo
01-26-2005, 11:26 AM
Hi,

What you did should work. Are you using an older version of Vizard? Either way, the following will work also:myLine = viz.endlayer(myObject.id)

jkelly
01-26-2005, 11:30 AM
That works great. I am using 2.17a, which is probably the problem.

Thanks.

Jon