Skip to content

Commit

Permalink
Fix compiler warnings (gcc 8.0.1).
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalint13 committed Mar 20, 2018
1 parent 8a2c89a commit bd20e1e
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 58 deletions.
14 changes: 10 additions & 4 deletions src/pba/DataInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ struct CameraT_
////////////////////////////////////////////////
template <class Float> void SetMatrixRotation(const Float * r)
{
for(int i = 0; i < 9; ++i) m[0][i] = float_t(r[i]);
for(int i = 0; i < 3; ++i)
for(int j = 0; j < 3; ++j)
m[i][j] = float_t(r[i*3+j]);
}
template <class Float> void GetMatrixRotation(Float * r) const
{
Expand Down Expand Up @@ -287,15 +289,19 @@ struct CameraT_
template <class Float> void SetInvertedRT(const Float e[3], const Float T[3])
{
SetRodriguesRotation(e);
for(int i = 3; i < 9; ++i) m[0][i] = - m[0][i];
for(int i = 1; i < 3; ++i)
for(int j = 0; j < 3; ++j)
m[i][j] = - m[i][j];
SetTranslation(T); t[1] = - t[1]; t[2] = -t[2];
}

template <class Float> void GetInvertedRT (Float e[3], Float T[3]) const
{
CameraT ci; ci.SetMatrixRotation(m[0]);
for(int i = 3; i < 9; ++i) ci.m[0][i] = - ci.m[0][i];
//for(int i = 1; i < 3; ++i) for(int j = 0; j < 3; ++j) ci.m[i][j] = - ci.m[i][j];
//for(int i = 3; i < 9; ++i) ci.m[0][i] = - ci.m[0][i];
for(int i = 1; i < 3; ++i)
for(int j = 0; j < 3; ++j)
ci.m[i][j] = - ci.m[i][j];
ci.GetRodriguesRotation(e);
GetTranslation(T); T[1] = - T[1]; T[2] = -T[2];
}
Expand Down
Loading

0 comments on commit bd20e1e

Please sign in to comment.