Skip to content

Commit

Permalink
Fix a bug on rotation matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsy committed Mar 15, 2016
1 parent 90cd767 commit 5f1fb1a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sources/math/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ namespace spica {
m[2][1] = a.y() * a.z() * (1.0 - cosTheta) + a.x() * sinTheta;
m[2][2] = a.z() * a.z() + (1.0 - a.z() * a.z()) * cosTheta;
m[2][3] = 0.0;

m[3][0] = 0.0;
m[3][1] = 0.0;
m[3][2] = 0.0;
m[3][3] = 1.0;

Matrix4x4 mat(m);
return Transform{ mat, mat.transposed() };
Expand Down

0 comments on commit 5f1fb1a

Please sign in to comment.