Fake Edit: Sorry about the weird title. Not sure yet how to phrase this question
Context: Working through this example: http://doc.qt.io/qt-5/qt3drenderer-multiviewport-example.html , this file: http://doc.qt.io/qt-5/qt3drenderer-multiviewport-main-qml.html
Here's a sparse version of the QML I'm looking at:
Entity {
id: rootNode
CameraLens {
id: cameraLens
...
}
Entity {
id: cameraViewport1
property Transform transform : Transform {
...
}
components: [cameraLens, transform]
}
Entity {
id: cameraViewport2
property Transform transform : Transform {
...
}
components: [cameraLens, transform]
}
}
So I've got these questions:
1-
How is the ID search performed? Presumably, it checks the local context first (so the transform
referenced in cameraViewport1
is found instead of the one in cameraViewport2
), and the proceeds up the tree (which would be how it finds the cameraLens
component), but I haven't been able to find documentation that confirms or explains this.
2-
Is there only one cameraLens
that is shared by both cameraViewport
entities? As in, if I access and change the cameraLens
through cameraViewport1
, do those changes effect cameraViewport2
? Basically, it is "passed" by value, or by reference?
I may have simply been unable to find the documentation; if so, links are good, links with explanations as to how to find them are better! (there's more I haven't been able to find docs on)