Skip to content

Commit

Permalink
Bug create rot from isometry
Browse files Browse the repository at this point in the history
  • Loading branch information
deseilligny committed Jun 10, 2024
1 parent f7591b3 commit f7fca7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions MMVII/include/MMVII_Geom3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ template <class Type> class cRotation3D
typedef cRotation3D<Type> tTypeMapInv;
static int NbDOF() {return 3;}

/// Create a "dummy" rotation, initialized with null matrix (to force problem if not init later)
cRotation3D();

/// RefineIt : if true, assume not fully orthog and compute closest one
cRotation3D(const cDenseMatrix<Type> &,bool RefineIt);
Expand Down
14 changes: 13 additions & 1 deletion MMVII/src/Geom3D/cRotation3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ template <class Type> cIsometry3D<Type>::cIsometry3D(const tPt& aTr,const cRotat
* any use drive quickly to absurd result if not error
*/
template <class Type> cIsometry3D<Type>::cIsometry3D() :
cIsometry3D(tPt(0,0,0),cRotation3D<Type>(cDenseMatrix<Type>(3,3,eModeInitImage::eMIA_Null),false))
cIsometry3D
(
tPt(0,0,0),
// cRotation3D<Type>(cDenseMatrix<Type>(3,3,eModeInitImage::eMIA_Null),false)
cRotation3D<Type>()
)
{
}

Expand Down Expand Up @@ -254,6 +259,12 @@ void AddData(const cAuxAr2007 & anAux,tPoseR & aPose)
/* */
/* ************************************************* */

template <class Type> cRotation3D<Type>::cRotation3D() :
mMat (3,3,eModeInitImage::eMIA_Null)
{
}
// cRotation3D<Type>(cDenseMatrix<Type>(3,3,eModeInitImage::eMIA_Null),false)

template <class Type> cRotation3D<Type>::cRotation3D(const cDenseMatrix<Type> & aMat,bool RefineIt) :
mMat (aMat)
{
Expand All @@ -272,6 +283,7 @@ template <class Type> cRotation3D<Type>::cRotation3D(const cDenseMatrix<Type> &

// are the vector unitar, take into account accuracy of type
tREAL8 aDifN = (std::abs(SqN2(aI)-1)+std::abs(SqN2(aJ)-1)+std::abs(SqN2(aK)-1)) / tElemNumTrait<Type>::Accuracy() ;
// StdOut() << "ffffffffff " << std::abs(SqN2(aI)-1)<< " " << std::abs(SqN2(aJ)-1) << " " << std::abs(SqN2(aK)-1) << "\n";
MMVII_INTERNAL_ASSERT_tiny(aDifN<1e-3,"Rotation 3D init non norm w/o RefineIt");

// are the vector orthognal, take into account accuracy of type
Expand Down

0 comments on commit f7fca7e

Please sign in to comment.