opengl - Given a 4x4 homogeneous matrix, how can i get 3D world coords? -
so have object getting rotated translated , rotated again. storing matrix of these translations object member. when come object picking need know 3d world coords of object.
currently have been able position of object so
coords[1] = finalmatrix[13]; coords[2] = finalmatrix[14]; coords[0] = finalmatrix[12];
this giving me correct positions of objects want take rotations account well.
any great...
the matrix 4x4 matrix, you've got single dimensional matrix appears elements arranged follows:
[0] [4] [8] [12] [1] [5] [9] [13] [2] [6] [10] [14] [3] [7] [11] [15]
the rotation part top left 3x3 matrix see here, in case elements [0]-[2]
, [4]-[6]
, [8]-[10]
Comments
Post a Comment