Skip to content

Commit

Permalink
fixed crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Jun 12, 2024
1 parent bfcb96f commit 1758ab2
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/core/math/pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,23 @@ Vec3d Pose::transformInv(const Vec3d& p) {
return Vec3d(P);
}

PosePtr Pose::multLeft(PosePtr p) { auto m1 = asMatrix(); auto m2 = p->asMatrix(); m1.multLeft(m2); return Pose::create(m1); }
PosePtr Pose::multRight(PosePtr p) { auto m1 = asMatrix(); auto m2 = p->asMatrix(); m1.mult(m2); return Pose::create(m1); }
PosePtr Pose::multLeft(PosePtr p) {
auto m1 = asMatrix();
if (p) {
auto m2 = p->asMatrix();
m1.multLeft(m2);
}
return Pose::create(m1);
}

PosePtr Pose::multRight(PosePtr p) {
auto m1 = asMatrix();
if (p) {
auto m2 = p->asMatrix();
m1.mult(m2);
}
return Pose::create(m1);
}

void Pose::setPos(const Vec3d& p) { data[0] = p; }
void Pose::setDir(const Vec3d& d) { data[1] = d; }
Expand Down

0 comments on commit 1758ab2

Please sign in to comment.