Dot getter-notation for matricies

   1072   1   0
User Avatar
Member
15 posts
Joined: Dec. 2021
Offline
Hi!

Following this [www.youtube.com] tutorial, this vex code is used:

xform.xa = 0;
xform.ya = 0;
xform.za = 0;

From my own testing, x, y, z, and w correspond to the first, second, third, and fourth rows. However I can't make much sense of the letter afterwards. a seems to refer to the fourth column and b to the third, but I can't figure out which letters refer to the first and second columns. Can I get any pointers?

Thanks!
Anson
User Avatar
Member
9384 posts
Joined: July 2007
Online
AnsonSavageBYU
which letters refer to the first and second columns

It's xyzw and rgba

So r and g

But there is also u and v for first 2 (at least for vector2 variables)

You should be able to use them interchangeably
So .xx .rx .rr .xr should all reference the first row first column, etc.
Edited by tamte - May 10, 2023 21:25:06
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links