minor changes to RotationMatrix of Matrix33
This commit is contained in:
parent
37adbd6434
commit
c4cb66234b
|
@ -574,16 +574,12 @@ Matrix33<S> RotationMatrix(vcg::Point3<S> v0,vcg::Point3<S> v1,bool normalized=t
|
||||||
///return the rotation matrix along axis
|
///return the rotation matrix along axis
|
||||||
template <class S>
|
template <class S>
|
||||||
Matrix33<S> RotationMatrix(const vcg::Point3<S> &axis,
|
Matrix33<S> RotationMatrix(const vcg::Point3<S> &axis,
|
||||||
const float &angleRad)
|
const S &angleRad)
|
||||||
{
|
{
|
||||||
vcg::Matrix44<S> matr44;
|
vcg::Matrix44<S> matr44;
|
||||||
vcg::Matrix33<S> matr33;
|
matr44.SetRotateRad(angleRad,axis);
|
||||||
matr44.SetRotateRad(angleRad,axis);
|
return vcg::Matrix33<S>(matr44, 3);
|
||||||
for (int i=0;i<3;i++)
|
}
|
||||||
for (int j=0;j<3;j++)
|
|
||||||
matr33[i][j]=matr44[i][j];
|
|
||||||
return matr33;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// return a random rotation matrix, from the paper:
|
/// return a random rotation matrix, from the paper:
|
||||||
/// Fast Random Rotation Matrices, James Arvo
|
/// Fast Random Rotation Matrices, James Arvo
|
||||||
|
|
Loading…
Reference in New Issue