Notifications
Clear all

[Closed] converting coordinate values

how would you guys approach this, on converting these values from a Y up coordinate system to Max’s Z up coordinates. for move,rotate and scale., btw sorry for the double post

the txt file i am pulling in values look like this:
nr:0
asset: bridge3.obj
xpos: 4.77926635742
ypos: 295.343948364
zpos: -474.406799316
xrot: -178.68342590
yrot: 52.5331878662
zrot: -178.026260376
xscale: 0.409979230788
yscale: 1.86230026253
zscale: 4.30338694181

2 Replies

something like this:


fn convertUp_Y_Z xpos ypos zpos xpot yrot zrot xscale yscale zscale = 
(
	y_up_matrix = translate (rotate (scalematrix [xscale, yscale, zscale]) (eulerAngles xpot yrot zrot)) [xpos, ypos, zpos]
	z_up_matrix = y_up_matrix * (matrix3 [1,0,0] [0,0,-1] [0,1,0] [0,0,0])
)

ah as i assumed, a matrix multiplication

Thanks Denis!