cancel
Showing results for 
Search instead for 
Did you mean: 

screen axes in API

Phenom
Phenom

Hi,

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.

 

Thanks,

AP

2 REPLIES

Re: screen axes in API

Siemens Phenom Siemens Phenom
Siemens Phenom

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

Phenom
Phenom

Thanks George,

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

AP