Changeset 5665 in orxonox.OLD for trunk/src/lib/math/matrix.h
- Timestamp:
- Nov 21, 2005, 10:17:56 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/matrix.h
r5664 r5665 29 29 }; 30 30 31 Matrix operator+ (const Matrix& m) {31 Matrix operator+ (const Matrix& m) const { 32 32 return Matrix (this->m11 + m.m11, this->m12 + m.m12, this->m13 + m.m13, 33 33 this->m21 + m.m21, this->m22 + m.m22, this->m23 + m.m23, … … 35 35 } 36 36 37 Matrix operator- (const Matrix& m) {37 Matrix operator- (const Matrix& m) const { 38 38 return Matrix (this->m11 - m.m11, this->m12 - m.m12, this->m13 - m.m13, 39 39 this->m21 - m.m21, this->m22 - m.m22, this->m23 - m.m23, … … 41 41 } 42 42 43 Matrix operator* (float k) {43 Matrix operator* (float k) const { 44 44 return Matrix(this->m11 - k, this->m12 - k, this->m13 - k, 45 45 this->m21 - k, this->m22 - k, this->m23 - k, … … 47 47 } 48 48 49 Vector operator* (const Vector& v) {49 Vector operator* (const Vector& v) const { 50 50 return Vector (this->m11*v.x + this->m12*v.y + this->m13*v.z, 51 51 this->m21*v.x + this->m22*v.y + this->m23*v.z, … … 55 55 56 56 57 Matrix getTransposed() {57 Matrix getTransposed() const { 58 58 return Matrix( this->m11, this->m21, this->m31, 59 59 this->m12, this->m22, this->m32, … … 61 61 } 62 62 63 void toVectors(Vector& m1, Vector& m2, Vector& m3) {63 void toVectors(Vector& m1, Vector& m2, Vector& m3) const { 64 64 m1 = Vector(this->m11, this->m12, this->m13); 65 65 m2 = Vector(this->m21, this->m22, this->m23); … … 67 67 } 68 68 69 Vector eigenValues() const; 70 void eigenVectors(Vector& a, Vector& b, Vector& c) const; 69 71 70 72 /// @todo optimize 71 73 static Matrix identity() { return Matrix (1,0,0, 0,1,0, 0,0,1); } 72 74 73 void eigVl(const Matrix& matrix);74 75 void debug() const; 75 76
Note: See TracChangeset
for help on using the changeset viewer.