MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getMountTransform

Method getMountTransform

Engine/source/T3D/shapeImage.cpp:1869–1892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1867//----------------------------------------------------------------------------
1868
1869void 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
1894void ShapeBase::getImageTransform(U32 imageSlot,MatrixF* mat)
1895{

Callers 10

processTickMethod · 0.45
shapeBase.cppFile · 0.45
processTickMethod · 0.45
setPositionMethod · 0.45
processTickMethod · 0.45
processTickMethod · 0.45
processTickMethod · 0.45
onMountMethod · 0.45
processTickMethod · 0.45

Calls 4

mulMethod · 0.45
getPositionMethod · 0.45
convolveMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected