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

Method updateEmitters

Engine/source/T3D/debris.cpp:942–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942void Debris::updateEmitters( Point3F &pos, Point3F &vel, U32 ms )
943{
944
945 Point3F axis = -vel;
946
947 if( axis.magnitudeSafe() == 0.0 )
948 {
949 axis = Point3F( 0.0, 0.0, 1.0 );
950 }
951 axis.normalizeSafe();
952
953
954 Point3F lastPos = mLastPos;
955
956 for( S32 i=0; i<DebrisData::DDC_NUM_EMITTERS; i++ )
957 {
958 if( mEmitterList[i] )
959 {
960 mEmitterList[i]->emitParticles( lastPos, pos, axis, vel, ms );
961 }
962 }
963
964}
965
966void Debris::prepRenderImage( SceneRenderState *state )
967{

Callers

nothing calls this directly

Calls 4

Point3FClass · 0.50
magnitudeSafeMethod · 0.45
normalizeSafeMethod · 0.45
emitParticlesMethod · 0.45

Tested by

no test coverage detected