Hi, I am still new here and have what sounds like should be a relatively simple question. I have a drawing that I can rotate, following the Discover Three.js book, by specifying arbitrary angles of rotation about the x, y, and z axes. In my application, I am rotating the entire Scene so that everything rotates together. Now, suppose I start out knowing a normal vector pointing along the X axis (1, 0, 0). Because it’s not an Object3D, it’s not part of the Scene and doesn’t rotate with everything else. After an arbitrary rotation, the Scene has a rotation value specified as Euler coordinates and a quaternion value specified as a Quaternion. How can I use one of those to know the new coordinates of my normal vector?
Is this a local vs. world coordinates question or a quaternion rotation question or something else? I suppose the normal vector, if it had rotated with the Scene, might still be pointing right along the (new) X axis in the Scene’s coordinate system. That’s pretty useless information to me. What I need to know are the x, y, z coordinates of a normal that would have rotated with the Scene. For a very simple example, if I rotate by 90 degrees about the Z axis, the old normal pointing along the X axis (1, 0, 0) would now be pointing along the Y axis (0, 1, 0). Sure, the Scene’s X and Y axes have probably changed, so that what I’m calling the Y axis is really the rotated X axis, but what I need is to know how the normal would have rotated in a fixed coordinate system that did not rotate along with the Scene. For simple rotations about a single axis, knowing how the normal changed should be pretty simple, but I’m guessing that arbitrary rotations about two or more axes will involve knowing what to do with the quaternion. But what?
And to be clear, the reason I need this is to implement clipping planes so that they “do the right thing” during, or at least after, a rotation. I.e, so the clipping planes rotate along with the Scene. In my current implementation, because a clipping pane is not an Object3D and not part of the scene, my clipping planes stay put in the original coordinate system rather than rotate with the scene, causing a quite undesirable effect by clipping where I don’t want them to.
Thanks for any advice you can offer.