| 1867 | //---------------------------------------------------------------------------- |
| 1868 | |
| 1869 | void ShapeBase::getMountTransform( S32 index, const MatrixF &xfm, MatrixF *outMat ) |
| 1870 | { |
| 1871 | // Returns mount point to world space transform |
| 1872 | if ( index >= 0 && index < SceneObject::NumMountPoints) { |
| 1873 | S32 ni = mDataBlock->mountPointNode[index]; |
| 1874 | if (ni != -1) { |
| 1875 | MatrixF mountTransform = mShapeInstance->mNodeTransforms[ni]; |
| 1876 | mountTransform.mul( xfm ); |
| 1877 | const Point3F& scale = getScale(); |
| 1878 | |
| 1879 | // The position of the mount point needs to be scaled. |
| 1880 | Point3F position = mountTransform.getPosition(); |
| 1881 | position.convolve( scale ); |
| 1882 | mountTransform.setPosition( position ); |
| 1883 | |
| 1884 | // Also we would like the object to be scaled to the model. |
| 1885 | outMat->mul(mObjToWorld, mountTransform); |
| 1886 | return; |
| 1887 | } |
| 1888 | } |
| 1889 | |
| 1890 | // Then let SceneObject handle it. |
| 1891 | Parent::getMountTransform( index, xfm, outMat ); |
| 1892 | } |
| 1893 | |
| 1894 | void ShapeBase::getImageTransform(U32 imageSlot,MatrixF* mat) |
| 1895 | { |
no test coverage detected