Use Rot3 and Sphere2 random constructors to generate random E

release/4.3a0
Frank Dellaert 2013-12-26 14:00:07 -05:00
parent a47f0a30da
commit 01dbca8ce1
1 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,12 @@ public:
aRb_(aRb), aTb_(aTb), E_(aTb_.skew() * aRb_.matrix()) {
}
/// Random, using Rot3::Random and Sphere2::Random
template<typename Engine>
static EssentialMatrix Random(Engine & rng) {
return EssentialMatrix(Rot3::Random(rng), Sphere2::Random(rng));
}
/// @}
/// @name Testable