OUTERPRODUCT(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

✨ OUTERPRODUCT(3G) ✨

okay bestie, so this page is OUTERPRODUCT(3G) β€” like, section 3G of the manual, the GLSL-adjacent corner of the universe. and it's literally just one function, but it comes in so many flavors. buckle up πŸ’–


🌸 NAME 🌸

outerProduct β€” calculate the outer product of a pair of vectors


πŸŽ€ DECLARATION πŸŽ€

here's the whole roster, every single one, no skips:

mat2 outerProduct(vec2 c, vec2 r);

mat3 outerProduct(vec3 c, vec3 r);

mat4 outerProduct(vec4 c, vec4 r);

mat2x3 outerProduct(vec3 c, vec2 r);

mat3x2 outerProduct(vec2 c, vec3 r);

mat2x4 outerProduct(vec4 c, vec2 r);

mat4x2 outerProduct(vec2 c, vec4 r);

mat3x4 outerProduct(vec4 c, vec3 r);

mat4x3 outerProduct(vec3 c, vec4 r);

dmat2 outerProduct(dvec2 c, dvec2 r);

dmat3 outerProduct(dvec3 c, dvec3 r);

dmat4 outerProduct(dvec4 c, dvec4 r);

dmat2x3 outerProduct(dvec3 c, dvec2 r);

dmat3x2 outerProduct(dvec2 c, dvec3 r);

dmat2x4 outerProduct(dvec4 c, dvec2 r);

dmat4x2 outerProduct(dvec2 c, dvec4 r);

dmat3x4 outerProduct(dvec4 c, dvec3 r);

dmat4x3 outerProduct(dvec3 c, dvec4 r);

πŸ¦‹ PARAMETERS πŸ¦‹

  • c β€” this one is the parameter that gets treated as a column vector. she's vertical, she's the lewk πŸ’…
  • r β€” and this one gets treated as a row vector. horizontal icon behavior ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea. outerProduct takes the first parameter, c, and treats it as a column vector β€” think a matrix with exactly one column. then it takes the second parameter, r, and treats it as a row vector β€” a matrix with exactly one row. then it does a linear algebraic matrix multiply c * r.

and what you get out the other side is a matrix where:

  • the number of rows equals the number of components in c, and
  • the number of columns equals the number of components in r.

that's it, that's the whole vibe. math said "you two? kiss." πŸ˜­πŸ’–


🌈 VERSION SUPPORT 🌈

the original had a big cute grid here, so let me lay it out for you. columns are OpenGL Shading Language versions: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50.

outerProduct (float):

  • 1.10 β€” nope, a - πŸ˜”
  • 1.20 β€” βœ”
  • 1.30 β€” βœ”
  • 1.40 β€” βœ”
  • 1.50 β€” βœ”
  • 3.30 β€” βœ”
  • 4.00 β€” βœ”
  • 4.10 β€” βœ”
  • 4.20 β€” βœ”
  • 4.30 β€” βœ”
  • 4.40 β€” βœ”
  • 4.50 β€” βœ”

outerProduct (double):

  • 1.10 β€” -
  • 1.20 β€” -
  • 1.30 β€” -
  • 1.40 β€” -
  • 1.50 β€” -
  • 3.30 β€” -
  • 4.00 β€” βœ”
  • 4.10 β€” βœ”
  • 4.20 β€” βœ”
  • 4.30 β€” βœ”
  • 4.40 β€” βœ”
  • 4.50 β€” βœ”

so the double version lowkey showed up late to the party β€” nothing before 4.00, periodt. the float one has been here since 1.20 and never left 🫢


πŸ”₯ SEE ALSO πŸ”₯

  • dot()

(yes, that's the whole list. she's short but she's got range.)


Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

Copyright Β© 2011-2014 Khronos Group


k byeee πŸŽ€ this page was sourced as [FIXME: source] and stamped 01/03/2018, and it's the OUTERPRODUCT(3G) moment. go forth and multiply your vectors, bestie. no cap. πŸ’–βœ¨πŸ¦‹
πŸ“¦ where this page comes from