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

Method setTransform

Engine/source/T3D/item.cpp:625–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623//----------------------------------------------------------------------------
624
625void Item::setTransform(const MatrixF& mat)
626{
627 Point3F pos;
628 mat.getColumn(3,&pos);
629 MatrixF tmat;
630 if (!mRotate) {
631 // Forces all rotation to be around the z axis
632 VectorF vec;
633 mat.getColumn(1,&vec);
634 tmat.set(EulerF(0,0,-mAtan2(-vec.x,vec.y)));
635 }
636 else
637 tmat.identity();
638 tmat.setColumn(3,pos);
639 Parent::setTransform(tmat);
640 if (!mStatic)
641 {
642 mAtRest = false;
643 mAtRestCounter = 0;
644 }
645
646 if ( mPhysicsRep )
647 mPhysicsRep->setTransform( getTransform() );
648
649 setMaskBits(RotationMask | PositionMask | NoWarpMask);
650}
651
652
653//----------------------------------------------------------------------------

Callers 15

emitParticlesMethod · 0.45
explodeMethod · 0.45
updateSoundMethod · 0.45
_conformLightsMethod · 0.45
renderFrameFunction · 0.45
_updatePhysicsMethod · 0.45
updatePosMethod · 0.45
buildPolyListMethod · 0.45
submitLightMethod · 0.45
updateSoundSourcesMethod · 0.45
submitLightsMethod · 0.45
ejectShellCasingMethod · 0.45

Calls 5

mAtan2Function · 0.85
getColumnMethod · 0.80
setColumnMethod · 0.80
setMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected