Hi, goo day all. I am here with a (i think common scenario) issue that can be solved different ways, but i want something specific. Attached is the mathematical explanation of my scenario. I have a 3D object(glb file) loaded in 3JS using GLTF loader. My glb file is created using blender. So my objects coordinate system lets say is OCS.
After that, I have data coming from a ccordinate system,and lets name it MCS. And last threeJS has its own coordinate system lets call TCS. All these system are Right Hand system, only the axes labels are different.
Now my object has different orientation and rotation based on the two data point B, A. (Data is in MCS). Now i can set my object position, rotation, scaling etc using the Vector3.set or copy method. So far its okay. But the rotation of the object is quite tricky this way and I need to do a lot of calculation and checking to find the rotation in 3D space, along with rotation axes etc.
Instead of setting this position, rotation, scaling manually, I want to apply a transformer to my object, so that it scales/orients as exected and then I just see it through my camers. For this, I have created a transformer matrix, that essentially should transform my object in such a way that i dont need to calculate its rotation manually between vectors and etc.
Following is the figure and formula how i transform my objects (points) from OCS to MCS and later to TCS to see the object on the screen. Just apply this transformation matrix to the object itself and then place the camera to see the object correctly.
However all these things are theoretical. I want to know how can I achieve this in THREE.JS built in library, or any other way. Anyone has experience with this type of issue? Please let me know.