Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5666 in orxonox.OLD for trunk


Ignore:
Timestamp:
Nov 21, 2005, 10:37:31 AM (19 years ago)
Author:
patrick
Message:

trunk/math: working on eigenvectors, almost got it

Location:
trunk/src/lib/math
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/math/matrix.cc

    r5665 r5666  
    107107  }
    108108
     109  Vector eigVc[3];
     110  /* eigenvec test */
     111  for(int i = 0; i < 3; i++)
     112  {
     113    eigVc[i].x =-1/this->m13*(this->m33 - eigValue[i]) + (this->m32*(-this->m31*this->m32 + this->m12*this->m33 - this->m12*eigValue[i])) /
     114        this->m13*(-this->m13*this->m22 - this->m12*this->m23 + this->m13*eigValue[i]);
     115    eigVc[i].y = -( -this->m13*this->m23 + this->m12*this->m33 - this->m12*eigValue[i]) /
     116        (-this->m31*this->m22 + this->m12*this->m23 + this->m13*eigValue[i]);
     117    eigVc[i].z = 1.0f;
     118
     119
     120    printf("home brewn: %f, %f, %f\n", eigVc[i].x, eigVc[i].y, eigVc[i].z);
     121
     122  }
     123
     124
     125
    109126  this->debug();
    110127}
Note: See TracChangeset for help on using the changeset viewer.