WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   hierarchicy with on-the-fly objects (https://forum.worldviz.com/showthread.php?t=281)

jkelly 01-26-2005 11:24 AM

hierarchicy with on-the-fly objects
 
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:
Code:

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


All times are GMT -7. The time now is 08:53 PM.

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