Base: add methods to transform a Vector3f with a Rotation or Placement

This commit is contained in:
wmayer
2022-08-04 11:45:39 +02:00
parent b0a5743264
commit 513ef44a13
4 changed files with 23 additions and 0 deletions

View File

@@ -160,6 +160,12 @@ void Placement::multVec(const Vector3d & src, Vector3d & dst) const
dst += this->_pos;
}
void Placement::multVec(const Vector3f & src, Vector3f & dst) const
{
this->_rot.multVec(src, dst);
dst += Base::toVector<float>(this->_pos);
}
Placement Placement::slerp(const Placement & p0, const Placement & p1, double t)
{
Rotation rot = Rotation::slerp(p0.getRotation(), p1.getRotation(), t);