Showing results for 
Search instead for 
Do you mean 
Solved! Go to solution

screen axes in API


Could anybody help me on this: I'm trying to compute the screen axes vectors in the API. My idea was to compute them using the view.rotation values, but I can't find the right formulas.

To me it seems that 1rst rot is around X0, 2nd around Y0 and 3rd around Z0 (which is not what is said in the help documentation...), so using rotation matrices should do the trick but I can't find the correct answer.


As a result if I place 2 points with these vector components as their coordinates I should always have the origin+these 2 points forming a coordinate system which is orthogonal to my screen, no matter how I've turned my model.


With the lastest "align the view along eye direction" adds I'm guessing developpers have this problem figured out.

If there is another way to retrieve screen axes as vectors I'm interested.




Accepted by topic author astrium_tls
‎11-14-2016 02:44 AM

Re: screen axes in API

You should be able to use the application method feRotationToDirCos( ) to convert rotations from the View object to a 3x3 direction cosine matrix. The rows of this matrix should then be the axes directions in screen coordinates.

Re: screen axes in API

Thanks George,

A colleague pointed me towards fePlaneALignView which returns Z and X screen axes, works as well.