fixes for RW compatibility

This commit is contained in:
aap
2020-04-23 22:18:53 +02:00
parent 752fceb1e3
commit 374f951d7c
7 changed files with 50 additions and 23 deletions
+19
View File
@@ -82,6 +82,25 @@ mult(const Quat &q, const Quat &p)
q.w*p.z + q.z*p.w + q.x*p.y - q.y*p.x);
}
Quat*
Quat::rotate(const V3d *axis, float32 angle, CombineOp op)
{
Quat rot = rotation(angle, *axis);
switch(op){
case COMBINEREPLACE:
*this = rot;
break;
case COMBINEPRECONCAT:
*this = mult(*this, rot);
break;
case COMBINEPOSTCONCAT:
*this = mult(rot, *this);
break;
}
return this;
}
Quat
lerp(const Quat &q, const Quat &p, float32 r)
{