24 #ifndef _HUGIN_MATH_MATRIX3_H_ 
   25 #define _HUGIN_MATH_MATRIX3_H_ 
   56         void SetRotation( 
double Yaw, 
double Pitch, 
double Roll );
 
   62     void SetRotationPT( 
double Yaw, 
double Pitch, 
double Roll );
 
   73     void SetRotationPT( 
double yaw, 
double pitch, 
double roll );
 
   76     void GetRotationPT( 
double & 
Yaw, 
double & 
Pitch, 
double & 
Roll );
 
   80         void SetRotationX( 
double a );
 
   82         void SetRotationY( 
double a );
 
   84         void SetRotationZ( 
double a );
 
   93     void operator/=(
double s);
 
   96     void operator*=(
double s);
 
  104                 for(
int i=0; i<3; i++)
 
  105                         for(
int j=0; j<3; j++)
 
  106                                 if(m[i][j] != ot.
m[i][j])
 
  114                 return !(*
this == ot);
 
  121                 Result.
m[0][0] = m[0][0];
 
  122                 Result.
m[0][1] = m[1][0];
 
  123                 Result.
m[0][2] = m[2][0];
 
  124                 Result.
m[1][0] = m[0][1];
 
  125                 Result.
m[1][1] = m[1][1];
 
  126                 Result.
m[1][2] = m[2][1];
 
  127                 Result.
m[2][0] = m[0][2];
 
  128                 Result.
m[2][1] = m[1][2];
 
  129                 Result.
m[2][2] = m[2][2];
 
  136                 double result =  m[0][0] * ( m[1][1] * m[2][2] - m[2][1] * m[1][2] );
 
  137                 result -= m[1][0] * ( m[0][1] * m[2][2] - m[2][1] * m[0][2] );
 
  138                 result += m[2][0] * ( m[0][1] * m[1][2] - m[1][1] * m[0][2] );
 
  146                 Result.
x = V.
x * m[0][0] + V.
y * m[1][0] + V.
z * m[2][0];
 
  147                 Result.
y = V.
x * m[0][1] + V.
y * m[1][1] + V.
z * m[2][1];
 
  148                 Result.
z = V.
x * m[0][2] + V.
y * m[1][2] + V.
z * m[2][2];
 
  156     void Print(std::ostream & o) 
const;
 
  170         double cs, ss, ux2, uy2, uz2, uxy, uxz, uyz;
 
  181     m.
m[0][0] = ux2 + cs*(1-ux2);
 
  182     m.
m[1][0] = uxy*(1-cs) - u.
z*ss;
 
  183     m.
m[2][0] = uxz*(1-cs) + u.
y*ss;
 
  184     m.
m[0][1] = uxy*(1-cs) + u.
z*ss;
 
  185     m.
m[1][1] = uy2 + cs*(1-uy2);
 
  186     m.
m[2][1] = uyz*(1-cs)-u.
x*ss;
 
  187     m.
m[0][2] = uxz*(1-cs)-u.
y*ss;
 
  188     m.
m[1][2] = uyz*(1-cs)+u.
x*ss;
 
  189     m.
m[2][2] = uz2 + cs*(1-uz2);
 
bool operator==(Matrix3 &ot) const 
comparison 
double m[3][3]
we define the Matrix3 as 3 colums of 3 rows 
void Print(std::ostream &o) const 
double Determinant() const 
get the determinant 
Vector3 GetNormalized() const 
return a normalized vector 
general : Matrix3 is a class for handling 3x3 Matrix manipulation. 
vigra::Diff2D operator*(const vigra::Diff2D &d, double scale)
Vector3 TransformVector(const Vector3 &V) const 
transforms a vector 
Matrix3 Transpose()
retrieves transpose 
Matrix3 GetRotationAroundU(const Vector3 &U, double Angle)
return the rotation matrix around vector U : checked 
void SetIdentity()
Set the identity matrix. 
double Norm() const 
euclidien norm 
std::ostream & operator<<(std::ostream &o, const hugin_utils::TDiff2D< T > &d)
general : Vector3 is a class for handling 3D Vectors manipulation. 
bool operator!=(Matrix3 &ot) const 
comparison 
double x
x,y,z coordinates, 0 at the initialisation