WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   What is the difference between parent and link? (https://forum.worldviz.com/showthread.php?t=5574)

Novakin 12-07-2015 07:37 AM

What is the difference between parent and link?
 
See title. Just started using Vizard for a couple of weeks now, read a lot of the documentation but can't quite understand this.

Say I want to have an object move together with another. For example I could have a glove in the scene and I want that glove to hold a flashlight. The way I understand it, I could either:
- call setParent() on the flashlight to set it's parent to the glove
- call link() to link the flashlight to the glove

Is this right?

Jeff 12-09-2015 10:05 PM

Some tasks can be more easily accomplished using links while others are easier with parent/child relationships. You could use either a link or parent in the example you've provided. With parent/child relationships you can move the objects in their own local or parent coordinate system. The coordinate systems tutorial covers this topic. With links the source object's transform (position, orientation, scale) is applied to the destination object. However, there are operations that can be applied on the link to modify the source transform before it is applied to the destination. For example, different combinations of position, orientation, and scale can be applied to the destination object using masks and offsets between source and destination can be defined.

Novakin 12-10-2015 02:37 AM

That makes it more clear, thanks!


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

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