WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Transforms, Nodes and Links (https://forum.worldviz.com/showthread.php?t=5053)

shivanangel 06-01-2014 10:08 AM

Transforms, Nodes and Links
 
1 Attachment(s)
Moved from Vizard 4 forums to 5 since this my questions have gravitated toward the new .getTransform().

I have a hierarchical object that I have grabbed a transform from, in this case a shelf. I use the transform to move the shelf in and out using vizact.

I have a series of containers I want to place on the shelf, my prior instincts would have me parent the objects to the shelf so they move when the shelf comes out. However, the link object returned by getTransform does not support this.

How do I go about linking these objects in a smart (easy) way?
For instance, I also want to be able to offset the objects from one another (tradiditonally using .setPosition).

But if I use viz.link( shelf, container1) I have to apply the offset to the link using .offset(), meaning I now need to store these links for retrieval later if I choose to break it.

Is there a better way to do this in Vizard 5 that I am missing? Some way to insert an object under the link returned by getTransform?

Jeff 06-04-2014 08:43 PM

You could try linking a group node to the transform and then parenting all the objects to that group node.

farshizzo 06-13-2014 04:13 PM

I'm not sure I exactly understand what you are trying to accomplish, but you can use the optional node parameter of .setParent to parent an object to the sub-transform node:
Code:

# Get transform handle from model
xform = model.getTransform('name')

# Parent child under transform of model
child.setParent(model, node='name')



All times are GMT -7. The time now is 04:09 PM.

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