I have $3D$ point set lying on a vertical plane. This plane is not parallel to either $X$ or $Y$ axis but makes an angle (say, $\theta$) to $X$ axis. And also it has some ($+$ or $-$) intercept to the $X$ axis.
Now, I want to update my $X$ axis parallel to the azimuthal direction of my plane. And then I want to lie down the vertical plane to $XY$ plane. So, I think I could use my original $Z$ coordinates as the new $Y$ coordinates. As the plane lie on $XY$ plane, there should not be $Z$ coordinates any more. So, I want to know how to get my new $X$ coordinates from the original $XYZ$ and $\theta$.
Actually, I want to implement this modification in $c++$. But I am really poor in mathematics and struggling to figure out what should be the formula.
After doing this, I want to do some process with the new $XY$ point coordinates. And at the end, I want to bring back all my coordinates to original system. That is finally I want to go back to my original $XYZ$ axes. So I am also looking your assistant to get this case too.
Your assistant is highly appreciated.