So I've found that we have a huge problem with some of the transforms that we are using because they are mirrored matrices. Sceneform seems to only have support to express the rotations of Sceneform nodes via the localRotation or the worldRotation parameters as quaternions. As you probably know, one cannot express the rotations of mirrored matrices in quaternions.
Currently, when I ask the Quaternion class to interpret a mirrored matrix, it feeds back the identity matrix. This is because it can't express rotations within a mirrored matrix as far as I know.
Because of this, I fear we might have to do the following, which might be a lot of work:
For all flipped matrices in our scene, we would have to:
Check to see if the matrix is mirrored
If it is, multiply all vertices (thus creating a new RenderDefinition) and pass the identity matrix over instead. This could potentially be cumbersome and add a lot of nodes that could slow down the scene.
In my opinion, it is far easier to have a transform parameter, and then just use that to represent the rotation, translation, and scale of the vertices attached to the node. Apple already has this for their nodes as seen here: https://developer.apple.com/documentation/scenekit/scnnode/1407964-transform .
So I've found that we have a huge problem with some of the transforms that we are using because they are mirrored matrices. Sceneform seems to only have support to express the rotations of Sceneform nodes via the
localRotation
or theworldRotation
parameters as quaternions. As you probably know, one cannot express the rotations of mirrored matrices in quaternions.Currently, when I ask the Quaternion class to interpret a mirrored matrix, it feeds back the identity matrix. This is because it can't express rotations within a mirrored matrix as far as I know.
Because of this, I fear we might have to do the following, which might be a lot of work:
For all flipped matrices in our scene, we would have to:
RenderDefinition
) and pass the identity matrix over instead. This could potentially be cumbersome and add a lot of nodes that could slow down the scene.In my opinion, it is far easier to have a
transform
parameter, and then just use that to represent the rotation, translation, and scale of the vertices attached to the node. Apple already has this for their nodes as seen here: https://developer.apple.com/documentation/scenekit/scnnode/1407964-transform .Any help with this would be much appreciated.