| 643 | |
| 644 | |
| 645 | void TJugem::localMove(JGeometry::TVec3f *vec) { |
| 646 | const f32 half = 0.5f; |
| 647 | f32 someX = _208.x; |
| 648 | f32 someY = _208.y; |
| 649 | f32 someZ = _208.z; |
| 650 | |
| 651 | if ((getGlobalState() == 1) && !mIsStartPoint) { |
| 652 | someX *= -1.0f; |
| 653 | } |
| 654 | |
| 655 | static JGeometry::TQuat4f qtAxisY; |
| 656 | |
| 657 | f32 dx = vec->x - _22c.x; |
| 658 | f32 dz = vec->z - _22c.z; |
| 659 | |
| 660 | f32 theta = atan2f(dx, dz) * half; |
| 661 | f32 s = sinf(theta); |
| 662 | f32 c = cosf(theta); |
| 663 | |
| 664 | qtAxisY.set(0.0f, s, 0.0f, c); |
| 665 | |
| 666 | JGeometry::TVec3f local; |
| 667 | local.set(someX, someY, someZ); |
| 668 | |
| 669 | JGeometry::TVec3f rotated; |
| 670 | qtAxisY.transform(local, rotated); |
| 671 | |
| 672 | vec->add(rotated); |
| 673 | } |
| 674 | |
| 675 | void TJugem::globalMove(JGeometry::TVec3f *param_1) { |
| 676 | param_1->add(_22c); |