Hi fellow seniors, I have encountered a problem now. I am traversing some components in the scene, and they may be within a certain component or group, and may be nested at multiple levels. Now I need to get the component axes of these components. The coordinates are relative to the world coordinate system, but when I use the .transformation.origin method, the results are relative to the coordinate axis in the group space where it is located. I try to determine the parent space where these components are located. parent , when it is in a group, the return value is ComponentDefinition. I am a little confused, why is it not a component instance or group? Now how do I proceed, is there perhaps a more convenient way to get the coordinates of the component axis within the group relative to the world coordinate system? Thank you so much!
Because component and group instances do not themselves have an
Entities collection. It is their parent definition that owns the collection of entities.
As you traverse the model hierarchy, build a current path of the instances in an array and then you can get the combined transformation via
InstancePath#transformation by passing that array to the
InstancePath class constructor method.