Skip to content
Snippets Groups Projects

ACG Matrix3x3T: add getRow() and getCol() convenience getters

Merged Martin Heistermann requested to merge acg-mat3x3-getters into master
1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -95,6 +95,13 @@ class Matrix3x3T {
return values_[i];
}
Vec3 getRow(uint_fast8_t r) const {
return Vec3((*this)(r,0), (*this)(r,1), (*this)(r,2));
}
Vec3 getCol(uint_fast8_t c) const {
return Vec3((*this)(0,c), (*this)(1,c), (*this)(2,c));
}
constexpr Matrix3x3T operator*(const Matrix3x3T &rhs) const {
return Matrix3x3T {{
(*this)(0, 0) * rhs(0, 0) + (*this)(0, 1) * rhs(1, 0) + (*this)(0, 2) * rhs(2, 0),
Loading