In my application, I am attempting to connect 2 points in 3d space with a cylinder via a function taking in 2 vectors. I understand that I need the angle to apply to the cylinder. As I understand, I can calculate this angle with the dot product of both vectors. How can I know how to apply the angle given this function:
func SCNMatrix4MakeRotation(angle: Float, x: Float, y: Float, z: Float) -> SCNMatrix4
angle: The amount of rotation, in radians, measured counterclockwise around the rotation axis. x: The x-component of the rotation axis. y: The y-component of the rotation axis. z: The z-component of the rotation axis.
How should I apply the correct angle here? Parameters x, y, and z take in a number between 0 and 1. With respect to which plane does the rotation occur?