PDA

View Full Version : What is the difference between parent and link?


Novakin
12-07-2015, 07:37 AM
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 (http://docs.worldviz.com/vizard/#Tutorial__Hierarchical_objects.htm) 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!