Check camera validity using tranformation matrix

Former-commit-id: 78cd65c050
pull/1161/head
Dakota Benjamin 2018-01-09 15:21:26 -05:00
rodzic 35c19c1890
commit 5936e821c3
2 zmienionych plików z 15 dodań i 1 usunięć

5
.gitignore vendored
Wyświetl plik

@ -4,7 +4,12 @@ include/
lib/
logs/
share/
src/
!modules/*
download/
SuperBuild/build/

Wyświetl plik

@ -192,7 +192,16 @@ Vec3 GeorefCamera::getReferencedPos()
bool GeorefCamera::isValid()
{
return focalLength_ != 0 && k1_ != 0 && k2_ != 0;
return focalLength_ != 0 &&
((*transform_)(0, 0) != 0 ||
(*transform_)(0, 1) != 0 ||
(*transform_)(0, 2) != 0 ||
(*transform_)(1, 0) != 0 ||
(*transform_)(1, 1) != 0 ||
(*transform_)(1, 2) != 0 ||
(*transform_)(2, 0) != 0 ||
(*transform_)(2, 1) != 0 ||
(*transform_)(2, 2) != 0);
}
std::ostream& operator<<(std::ostream &os, const GeorefCamera &cam)