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++)
114 return !(*
this ==
ot);
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;
std::ostream & operator<<(std::ostream &s, const Matrix3 &m)
Matrix3 GetRotationAroundU(const Vector3 &U, double Angle)
return the rotation matrix around vector U : checked
general : Matrix3 is a class for handling 3x3 Matrix manipulation.
void SetIdentity()
Set the identity matrix.
bool operator!=(Matrix3 &ot) const
comparison
Matrix3 Transpose()
retrieves transpose
double Determinant() const
get the determinant
double m[3][3]
we define the Matrix3 as 3 colums of 3 rows
Vector3 TransformVector(const Vector3 &V) const
transforms a vector
bool operator==(Matrix3 &ot) const
comparison
void Print(std::ostream &o) const
general : Vector3 is a class for handling 3D Vectors manipulation.
double x
x,y,z coordinates, 0 at the initialisation
Vector3 GetNormalized() const
return a normalized vector
vigra::Diff2D operator*(const vigra::Diff2D &d, double scale)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.