Public Group

# transform help

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

## 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 on other sites
Possibly x,y,z,w of a quaternion?

##### 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)

 [ 1 0 9619 ] [ 0 1 582 ] [ 0 0 1 ] 
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

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

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 10
• 9
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
633691
• Total Posts
3013343
×