Experimental 3D rotation handling
This commit is contained in:
parent
e0624b3b54
commit
05d4adfae4
@ -534,6 +534,7 @@ def ConvertFlashRotation(rotY, rotZ, X, Y, width, height):
|
|||||||
FOV = width*math.tan(2*math.pi/9.0)/2
|
FOV = width*math.tan(2*math.pi/9.0)/2
|
||||||
scaleXY = FOV/(FOV+trZ)
|
scaleXY = FOV/(FOV+trZ)
|
||||||
if scaleXY < 0:
|
if scaleXY < 0:
|
||||||
|
scaleXY = 1
|
||||||
logging.error('Clipped rotation: trZ == %.0f < %.0f' % (trZ, FOV));
|
logging.error('Clipped rotation: trZ == %.0f < %.0f' % (trZ, FOV));
|
||||||
trX = (trX-width/2)*scaleXY+width/2
|
trX = (trX-width/2)*scaleXY+width/2
|
||||||
trY = (trY-height/2)*scaleXY+height/2
|
trY = (trY-height/2)*scaleXY+height/2
|
||||||
|
Loading…
Reference in New Issue
Block a user