minor changes to RotationMatrix of Matrix33

This commit is contained in:
Luigi Malomo 2021-01-10 02:04:04 +01:00
parent 37adbd6434
commit c4cb66234b
1 changed files with 6 additions and 10 deletions

View File

@ -574,16 +574,12 @@ Matrix33<S> RotationMatrix(vcg::Point3<S> v0,vcg::Point3<S> v1,bool normalized=t
///return the rotation matrix along axis
template <class S>
Matrix33<S> RotationMatrix(const vcg::Point3<S> &axis,
const float &angleRad)
{
vcg::Matrix44<S> matr44;
vcg::Matrix33<S> matr33;
matr44.SetRotateRad(angleRad,axis);
for (int i=0;i<3;i++)
for (int j=0;j<3;j++)
matr33[i][j]=matr44[i][j];
return matr33;
}
const S &angleRad)
{
vcg::Matrix44<S> matr44;
matr44.SetRotateRad(angleRad,axis);
return vcg::Matrix33<S>(matr44, 3);
}
/// return a random rotation matrix, from the paper:
/// Fast Random Rotation Matrices, James Arvo