Skip to main content
gamedev.net
🔒 Locked

World transform matrix

Started by Hannesnisula Mar 9, 2009 at 9:54 AM 1 replies 550+ views
Original Post
Hannesnisula
Hannesnisula
Which float variables are position, rotation and scaling in:

typedef struct _D3DMATRIX {
    union {
        struct {
            float        _11, _12, _13, _14;
            float        _21, _22, _23, _24;
            float        _31, _32, _33, _34;
            float        _41, _42, _43, _44;

        };
        float m[4][4];
    };
} D3DMATRIX;

?
Evil Steve
Evil Steve
Position is in _41, _42 and _43, and scaling is in (_11, _22 and _33), sort of.

That's not how matrices work, they don't "contain" position, scaling and rotational components, they describe a way to convert from one coordinate system to another.
Hannesnisula
Hannesnisula
Oh, thanks!

Do you know any tutorial on that?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.