Fix calculation of transformed bounds not using inverse matrix

This commit is contained in:
David Vierra 2015-10-08 23:33:34 -10:00
parent c932f2aa30
commit 010fea7df8

View File

@ -23,6 +23,8 @@ def boundsCorners(bounds):
return list(corners)
def transformBounds(bounds, matrix):
# matrix goes from dest to source; we need source to dest here, so get inverse
matrix = np.linalg.inv(matrix)
corners = np.array(boundsCorners(bounds))
corners = np.hstack([corners, ([1],)*8])
corners = corners * matrix