Calculate the heading and pitch angle in ArcGIS API for JavaScript 3D.
- Convert the input points from geo coordinate system to internal render coordinate system
- Calculate affine transformation matrix from input geo coordinate system of the original point
- Get the inversed affine transformation matrix
- Apply the inversed matrix to the direction of internal render coordinate system
- Normalize the final direction vector
- Get heading and pitch from direction