26 #ifndef __BIAS_SimilarityTransformation3D_hh__
27 #define __BIAS_SimilarityTransformation3D_hh__
32 #include <Base/Common/BIASpragmaStart.hh>
33 #include <Base/Debug/Debug.hh>
34 #include <Base/Geometry/Quaternion.hh>
35 #include <Base/Math/Matrix4x4.hh>
36 #include <Base/Geometry/HomgPoint3D.hh>
37 #include <Base/Math/Vector3.hh>
71 : Q_(0.0, 0.0, 0.0, 1.0),
72 C_(0.0,0.0,0.0), scale_(1.0) {}
100 const double& scale = 1.0)
101 { Q_ = Q; C_ = C; scale_ = scale; }
129 bool Load(
const std::string& inputFile);
134 bool Save(
const std::string& outputFile);
138 Q_.Invert(); scale_ = 1.0 / scale_;
139 C_ = -scale_ * Q_.MultVec(C_);
147 Q_.Mult(arg.
Q_,result.
Q_);
148 Q_.MultVec(arg.
C_, result.
C_);
158 { Q_.MultVec(vec, result); result *= scale_; result += C_; }
166 { GetTransformMatrix().Mult(vec, result); }
186 os<<
"Q_= "<<p.
Q_<<
" C_= "<<p.
C_<<
" scale_= "<<p.
scale_;
201 arg1.
Mult(arg2,result);
218 #include <Base/Common/BIASpragmaEnd.hh>
int SetFromQuaternion(const Quaternion< ROTATION_MATRIX_TYPE > &q)
Set rotation matrix from a quaternion.
int GetQuaternion(Quaternion< ROTATION_MATRIX_TYPE > &quat) const
Calculates quaternion representation for this rotation matrix.
class HomgPoint3D describes a point with 3 degrees of freedom in projective coordinates.
std::ostream & operator<<(std::ostream &os, const Array2D< T > &arg)
DualQuaternion< T > operator*(const DualQuaternion< T > &l, const T &scalar)
Implements a 3D rotation matrix.
BIASCommon_EXPORT std::istream & operator>>(std::istream &is, BIAS::TimeStamp &ts)
Standard input operator for TimeStamps.