Closed asukaminato0721 closed 1 year ago
So in theory, if we know the initial 2 points, the final 2 points. We can calculate the matrix to rotate it. But I am not so good at calculating these things.
I will do this ;)
Done! I compared to the Wolfram output, it looks like it works correctly.
Buffer
only affects vertices and faces, I replace others withBuffer
Vector4.clone().add/sub(another)
is much shorter.var
withconst
About how to implement the
I find that there is a method called
computeBoundingBox
andboundingBox
which will give out the position information. (I added them in the code).So in theory, if we know the initial 2 points, the final 2 points. We can calculate the matrix to rotate it. But I am not so good at calculating these things.