| 838 | } |
| 839 | |
| 840 | MatrixF Entity::getTransform() |
| 841 | { |
| 842 | if (isMounted()) |
| 843 | { |
| 844 | MatrixF mat; |
| 845 | |
| 846 | //Use transform from mount |
| 847 | mMount.object->getMountTransform(mMount.node, mMount.xfm, &mat); |
| 848 | |
| 849 | Point3F transPos = mat.getPosition() + mPos; |
| 850 | |
| 851 | mat.mul(mRot.asMatrixF()); |
| 852 | |
| 853 | mat.setPosition(transPos); |
| 854 | |
| 855 | return mat; |
| 856 | } |
| 857 | else |
| 858 | { |
| 859 | return Parent::getTransform(); |
| 860 | } |
| 861 | } |
| 862 | |
| 863 | void Entity::setMountOffset(Point3F posOffset) |
| 864 | { |
no test coverage detected