sc::mat4(3)

πŸ“¦
version 2.3.1 Β· 4 versions
, in fedora 43, ubuntu noble

✨ NAME ✨

sc::mat4 β€” okay so this is a section 3 (Library Functions Manual) page, bestie, and it's all about the mat4 class. Think 4x4 matrix energy. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

πŸ’… Public Member Functions

  • mat4 (const vec4 &v0, const vec4 &v1, const vec4 &v2, const vec4 &v3) β€” build one from four vec4s, one per row-ish situation. πŸŽ€
  • mat4 (const double d) β€” build one from a single double. One number, whole matrix, it's giving minimalism. ✨
  • mat4 (const mat4 &m) β€” copy constructor, the classic. Make a mat4 that's a twin of m. 🫢
  • mat4 & operator= (const mat4 &m) β€” assignment. m's whole vibe becomes yours, and you get *this back. πŸ’–
  • mat4 & operator+= (const mat4 &m) β€” add m onto yourself, return *this. Math but make it in-place. πŸ”₯
  • mat4 & operator-= (const mat4 &m) β€” same deal but subtraction. Take m away from yourself. πŸ’€
  • mat4 & operator*= (const double d) β€” scale yourself by the double d, in place, *this returned. 🌸
  • mat4 & operator/= (const double d) β€” divide yourself by d in place. (No cap, dividing by zero is its own whole situation, be normal about it.) πŸ“
  • vec4 & operator[] (int i) β€” index in with an int i, get a vec4 & you can actually mess with. 🧚
  • const vec4 & operator[] (int i) const β€” same index, but the const version, so you get a const vec4 & and cannot touch. Respect the boundaries. ✨
  • mat4 transpose () const β€” hands you the transpose as a fresh mat4. It's const, so it does not touch the original. Iconic behaviour honestly. 🌈
  • mat4 inverse () β€” hands you the inverse. Not const, so yeah, noted. πŸ‘€
  • mat4 & apply (V_FCT_PTR fct) β€” runs the function pointer fct over it, returns *this. ⭐

πŸ”’ Protected Attributes

  • vec4 v [4] β€” the actual storage: an array of 4 vec4s. Protected, so it's for the class and its friends, not for randos. πŸ™ˆ

πŸ«‚ Friends

These get to see the protected stuff. Bestie privileges, fr fr.

  • mat4 operator- (const mat4 &a) β€” unary minus. Negate a, get a mat4. πŸ’œ
  • mat4 operator+ (const mat4 &a, const mat4 &b) β€” a plus b, brand new mat4. πŸ’–
  • mat4 operator- (const mat4 &a, const mat4 &b) β€” a minus b, brand new mat4. 🌸
  • mat4 operator* (const mat4 &a, const mat4 &b) β€” matrix times matrix. The main character of matrix ops. πŸ‘‘
  • mat4 operator* (const mat4 &a, const double d) β€” matrix times a double, matrix on the left. ✨
  • mat4 operator* (const double d, const mat4 &a) β€” matrix times a double, but the double is on the left. Order matters, bestie, always. πŸ”₯
  • mat4 operator/ (const mat4 &a, const double d) β€” matrix divided by a double. πŸŽ€
  • int operator== (const mat4 &a, const mat4 &b) β€” equality check, gives you an int. πŸ¦‹
  • int operator!= (const mat4 &a, const mat4 &b) β€” the not-equal one, also an int. πŸ’…
  • std::ostream & operator<< (std::ostream &s, mat4 &m) β€” stream m out into s, get s back. ⭐
  • std::istream & operator>> (std::istream &s, mat4 &m) β€” read m in from s, get s back. 🌈
  • void swap (mat4 &a, mat4 &b) β€” swap a and b. Returns nothing, just vibes. πŸ’«
  • vec4 operator* (const mat4 &a, const vec4 &v) β€” matrix times vec4, you get a vec4. πŸ’œ
  • vec3 operator* (const mat4 &a, const vec3 &v) β€” matrix times vec3, you get a vec3. Note the type change, that's the whole point. 🧚

🌟 Author 🌟

Generated automatically by Doxygen for MPQC from the source code. Like, nobody hand-wrote this, the robot did it. πŸ€–πŸ’–


And that's the whole page, bestie!! πŸŽ€ This was MPQC, Version 2.3.1, and yes it's the sc::mat4(3) page we've been yapping about this entire time. Go forth and multiply (matrices). Periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from