Changeset 5647 in orxonox.OLD for branches/network/src/lib/collision_detection/lin_alg.h
- Timestamp:
- Nov 20, 2005, 12:25:50 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/collision_detection/lin_alg.h
r5493 r5647 5 5 compute the eigenpairs (eigenvalues and eigenvectors) of a real symmetric matrix "A" by the Jacobi method 6 6 */ 7 8 9 /** 10 * function that calculates the eigenvectors from a given symmertical 3x3 Matrix 11 * @arg A: Matrix 12 * @arg D: Eigenvectors 13 */ 14 void eigenVectors(float** matrix, float **vectors) 15 { 16 /* map variables to other names, so they can be processed more easely */ 17 float a = matrix[0][0]; 18 float b = matrix[0][1]; 19 float c = matrix[0][2]; 20 float d = matrix[1][1]; 21 float e = matrix[1][2]; 22 float f = matrix[2][2]; 23 24 /* first eigenvector */ 25 vectors[0][0] = -1/c * (f - /*Root*/ (c*c*d - 2*b*c + a*e*e + b*b*f - a*d*f - 26 b*b - c*c + a*d - e*e + a*f )); 27 } 7 28 8 29
Note: See TracChangeset
for help on using the changeset viewer.