sc::mat3(3)
π 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 threevec3s, like picking out three outfits that slay together.mat3 (const double d)β build her from a singledoubled. one number, main character energy.mat3 (const mat3 &m)β copy constructor, she's twin sister tomand they're both iconic.mat3 & operator= (const mat3 &m)β assignment. she becomesm. no notes. β¨mat3 & operator+= (const mat3 &m)β addmonto her and return the glow-up.mat3 & operator-= (const mat3 &m)β subtractmfrom her, still returning her.mat3 & operator*= (const double d)β scale her byd, she stays in the chat.mat3 & operator/= (const double d)β divide her byd, returns her again. (no cap, that's just what it does.)
π Element Access β the way that she's indexable
vec3 & operator[] (int i)β grab thei-thvec3, mutable edition.const vec3 & operator[] (int i) constβ samei-thvec3, 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 pointerfctover her and hands her back to you.
π Protected Attributes β the inner circle
vec3 v [3]β threevec3s namedv, protected, doing the actual work behind the scenes. π
π Friends β the whole squad, standing on business
mat3 operator- (const mat3 &a)β unary minus ona.mat3 operator+ (const mat3 &a, const mat3 &b)βaplusb.mat3 operator- (const mat3 &a, const mat3 &b)βaminusb.mat3 operator* (const mat3 &a, const mat3 &b)β matrix times matrix.mat3 operator* (const mat3 &a, const double d)β matrix times scalard.mat3 operator* (const double d, const mat3 &a)β scalardtimes matrix, because commutativity is a lie and she said not today.mat3 operator/ (const mat3 &a, const double d)β matrix divided by scalard.int operator== (const mat3 &a, const mat3 &b)β areaandbthe same? returns anint.int operator!= (const mat3 &a, const mat3 &b)β are they not the same? also anint.std::ostream & operator<< (std::ostream &s, mat3 &m)β streammout throughs. π¨οΈstd::istream & operator>> (std::istream &s, mat3 &m)β streammin froms.void swap (mat3 &a, mat3 &b)β swapaandb. chaotic, but make it void.vec3 operator* (const mat3 &a, const vec3 &v)β matrix timesvec3gives you avec3.vec2 operator* (const mat3 &a, const vec2 &v)β matrix timesvec2gives you avec2.
π 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
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- ubuntu noble: libsc-doc 2.3.1-22build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms