sc::mat3(3)

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

πŸ’– sc::mat3 πŸ’–

okay so bestie, welcome to the sc::mat3 page from the Library Functions Manual β€” yes she's a 3Γ—3 matrix class and yes she is that girl. let's get into it πŸŽ€


✨ NAME ✨

sc::mat3 β€” your fave little 3Γ—3 matrix, living her best life in the sc namespace πŸ’…


🌸 SYNOPSIS 🌸

🫢 Public Member Functions

mat3 (const vec3 &v0, const vec3 &v1, const vec3 &v2)
mat3 (const double d)
mat3 (const mat3 &m)
mat3 & operator= (const mat3 &m)
mat3 & operator+= (const mat3 &m)
mat3 & operator-= (const mat3 &m)
mat3 & operator*= (const double d)
mat3 & operator/= (const double d)
vec3 & operator[] (int i)
const vec3 & operator[] (int i) const
mat3 transpose () const
mat3 inverse ()
mat3 & apply (V_FCT_PTR fct)

πŸ”’ Protected Attributes

vec3 v [3]

πŸ‘― Friends

mat3 operator- (const mat3 &a)
mat3 operator+ (const mat3 &a, const mat3 &b)
mat3 operator- (const mat3 &a, const mat3 &b)
mat3 operator* (const mat3 &a, const mat3 &b)
mat3 operator* (const mat3 &a, const double d)
mat3 operator* (const double d, const mat3 &a)
mat3 operator/ (const mat3 &a, const double d)
int operator== (const mat3 &a, const mat3 &b)
int operator!= (const mat3 &a, const mat3 &b)
std::ostream & operator<< (std::ostream &s, mat3 &m)
std::istream & operator>> (std::istream &s, mat3 &m)
void swap (mat3 &a, mat3 &b)
vec3 operator* (const mat3 &a, const vec3 &v)
vec2 operator* (const mat3 &a, const vec2 &v)

🌈 DESCRIPTION 🌈

ngl bestie, this is the whole vibe of sc::mat3: she's a matrix, she's got three vec3s stacked up in her protected little heart, and she comes with a full glow-up kit of constructors, operators, and friends who would literally do anything for her.


πŸ’… THE BREAKDOWN πŸ’…

🧚 Constructors & Assignment β€” her origin story

  • mat3 (const vec3 &v0, const vec3 &v1, const vec3 &v2) β€” build her from three vec3s, like picking out three outfits that slay together.
  • mat3 (const double d) β€” build her from a single double d. one number, main character energy.
  • mat3 (const mat3 &m) β€” copy constructor, she's twin sister to m and they're both iconic.
  • mat3 & operator= (const mat3 &m) β€” assignment. she becomes m. no notes. ✨
  • mat3 & operator+= (const mat3 &m) β€” add m onto her and return the glow-up.
  • mat3 & operator-= (const mat3 &m) β€” subtract m from her, still returning her.
  • mat3 & operator*= (const double d) β€” scale her by d, she stays in the chat.
  • mat3 & operator/= (const double d) β€” divide her by d, returns her again. (no cap, that's just what it does.)

πŸŽ€ Element Access β€” the way that she's indexable

  • vec3 & operator[] (int i) β€” grab the i-th vec3, mutable edition.
  • const vec3 & operator[] (int i) const β€” same i-th vec3, but const and unbothered. πŸ’œ

πŸ¦‹ Transformations β€” her actual tricks

  • mat3 transpose () const β€” returns her transposed. const because she's not changing for anyone.
  • mat3 inverse () β€” returns her inverse. πŸ”₯
  • mat3 & apply (V_FCT_PTR fct) β€” runs the function pointer fct over her and hands her back to you.

πŸ‘‘ Protected Attributes β€” the inner circle

  • vec3 v [3] β€” three vec3s named v, protected, doing the actual work behind the scenes. πŸ™ˆ

🌟 Friends β€” the whole squad, standing on business

  • mat3 operator- (const mat3 &a) β€” unary minus on a.
  • mat3 operator+ (const mat3 &a, const mat3 &b) β€” a plus b.
  • mat3 operator- (const mat3 &a, const mat3 &b) β€” a minus b.
  • mat3 operator* (const mat3 &a, const mat3 &b) β€” matrix times matrix.
  • mat3 operator* (const mat3 &a, const double d) β€” matrix times scalar d.
  • mat3 operator* (const double d, const mat3 &a) β€” scalar d times matrix, because commutativity is a lie and she said not today.
  • mat3 operator/ (const mat3 &a, const double d) β€” matrix divided by scalar d.
  • int operator== (const mat3 &a, const mat3 &b) β€” are a and b the same? returns an int.
  • int operator!= (const mat3 &a, const mat3 &b) β€” are they not the same? also an int.
  • std::ostream & operator<< (std::ostream &s, mat3 &m) β€” stream m out through s. πŸ–¨οΈ
  • std::istream & operator>> (std::istream &s, mat3 &m) β€” stream m in from s.
  • void swap (mat3 &a, mat3 &b) β€” swap a and b. chaotic, but make it void.
  • vec3 operator* (const mat3 &a, const vec3 &v) β€” matrix times vec3 gives you a vec3.
  • vec2 operator* (const mat3 &a, const vec2 &v) β€” matrix times vec2 gives you a vec2.

πŸ“ Author πŸ“

Generated automatically by Doxygen for MPQC from the source code. so technically nobody wrote her, she just spawned in fully formed and gorgeous. slay.

and that's the whole page bestie πŸ’– mwah, drink some water, and remember: it's MPQC Version 2.3.1, dated sc::mat3(3) β€” periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from