replace double matrix call
parent
2572265096
commit
2dde2cf27c
|
|
@ -183,8 +183,11 @@ Rot3 Rot3::operator*(const Rot3& R2) const {
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Point3 Rot3::rotate(const Point3& p,
|
Point3 Rot3::rotate(const Point3& p,
|
||||||
boost::optional<Matrix&> H1, boost::optional<Matrix&> H2) const {
|
boost::optional<Matrix&> H1, boost::optional<Matrix&> H2) const {
|
||||||
if (H1) *H1 = matrix() * skewSymmetric(-p.x(), -p.y(), -p.z());
|
if (H1 || H2) {
|
||||||
if (H2) *H2 = matrix();
|
const Matrix R(matrix());
|
||||||
|
if (H1) *H1 = R * skewSymmetric(-p.x(), -p.y(), -p.z());
|
||||||
|
if (H2) *H2 = R;
|
||||||
|
}
|
||||||
return r1_ * p.x() + r2_ * p.y() + r3_ * p.z();
|
return r1_ * p.x() + r2_ * p.y() + r3_ * p.z();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue