Sign in to follow this  

transform help

This topic is 2376 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working with someone else's design, and they use stuff like this in the level description:

{ type="nugget"; transform=(1, 0, 0, 1, 9619, 582); },

Anyone know what the first four numbers are? I know the last 2 are x and y.

Share this post


Link to post
Share on other sites
"x and y" are usually names for co-ordinate variables and hence not very expressive by itself. However, from this I assume that we're speaking of a 2D transform. Then the former values are presumably the combined rotation/scale matrix. Then all numbers together define a homogeneous transformation matrix (in the following written using column vectors)

[code]
[ 1 0 9619 ]
[ 0 1 582 ]
[ 0 0 1 ]
[/code]
where the 1st and 2nd row is stored in the file, and the 3rd row is constant. Notice that the layout in the file is column major in the case of using column vectors.

If so, then a transform=(c1, c2, c3, c4, c5, c6) means a transformation like in the matrix

[code]
[ c1 c3 c5 ]
[ c2 c4 c6 ]
[ 0 0 1 ]
[/code]

Share this post


Link to post
Share on other sites

This topic is 2376 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this