Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - gerg

Pages: [1]
1
Python and Java API / Rotating a georeferenced model
« on: March 17, 2017, 04:37:42 PM »
Hey all,

I'm trying to rotate a georeferenced model so that it is in a specific orientation when exported. When I do even simple rotations (like 90 degrees about Z axis, for example) I end up with a bizarre rotation. As a sanity check, I have used the same exact script to rotate a non-georeferenced model, and I had no problem doing exactly what I want.

Is there a secondary matrix for georeferenced models that I also need to refer to when trying to do this rotation? Like one that changes from local coordinates to absolute coordinate?

Example for yaw 90 degrees:

...
T = PhotoScan.Matrix( [[0,-1,0,0],
                         [1,0,0,0],
                         [0,0,1,0],
                         [0,0,0,1]]);
chunk.transform.matrix = chunk.transform.matrix * T
...

Many thanks,

Greg

Pages: [1]