Transformation matrix accounts for coordinates being the lower-left corner of cells.
This commit is contained in:
parent
adf70cf8a6
commit
4778a3c87d
@ -47,6 +47,9 @@ def rotationMatrix(anchor, rotX, rotY, rotZ):
|
||||
translate[3, 1] = anchor[1]
|
||||
translate[3, 2] = anchor[2]
|
||||
|
||||
# Rotate around center of cells.
|
||||
anchor = Vector(*anchor) - (0.5, 0.5, 0.5)
|
||||
|
||||
reverse_translate = np.matrix(np.identity(4))
|
||||
reverse_translate[3, 0] = -anchor[0]
|
||||
reverse_translate[3, 1] = -anchor[1]
|
||||
|
Reference in New Issue
Block a user