Home
Reply
Regular Contributor
bheld
Posts: 41

Is there any way to create a SPAtransf from a 4x4 matrix?

We have been unable to locate any such functions...

Spatial Moderator
ybiyani
Posts: 223

Re: Is there any way to create a SPAtransf from a 4x4 matrix?

Hello Ben,

 

We will soon update this with our reply.

 

Regards,

Yogesh

Spatial Employee
Entity
Posts: 64

Re: Is there any way to create a SPAtransf from a 4x4 matrix?

Hello bheld,

 

ACIS does not currently provide a function to go directly from a 4x4 perspective projection matrix to a SPAtransf.  If you are able to extract the affine matrix and translation mathematically, however, then you could use the function restore_transf (undocumented, but declared in transf.hxx).  Its signature is as follows:

 

SPAtransf restore_transf( SPAmatrix const &affine, SPAvector const &translation, double scale, logical rotate, logical reflect, logical shear ) 

 

The three logicals specify whether the transform is rotational, reflecting, and/or shear.  (This information is cached in order to improve performance.)  It is important to set these correctly in order to avoid downstream problems (which is why we normally discourage the use of this particular function).

 

Best regards,

John

Contributor
triet
Posts: 28

Re: Is there any way to create a SPAtransf from a 4x4 matrix?

Hi, I have the same request about this. I hope Spatial will add this functionality in the future release.

 

Thanks.

 

MT.