(float angle, float v0, float v1, float v2)
| 769 | |
| 770 | |
| 771 | protected void invRotate(float angle, float v0, float v1, float v2) { |
| 772 | //TODO should make sure this vector is normalized |
| 773 | |
| 774 | float c = cos(-angle); |
| 775 | float s = sin(-angle); |
| 776 | float t = 1.0f - c; |
| 777 | |
| 778 | preApply((t*v0*v0) + c, (t*v0*v1) - (s*v2), (t*v0*v2) + (s*v1), 0, |
| 779 | (t*v0*v1) + (s*v2), (t*v1*v1) + c, (t*v1*v2) - (s*v0), 0, |
| 780 | (t*v0*v2) - (s*v1), (t*v1*v2) + (s*v0), (t*v2*v2) + c, 0, |
| 781 | 0, 0, 0, 1); |
| 782 | } |
| 783 | |
| 784 | |
| 785 | protected void invScale(float x, float y, float z) { |