| 894 | } |
| 895 | |
| 896 | void Debris::explode() |
| 897 | { |
| 898 | |
| 899 | if( !mDataBlock->explosion ) return; |
| 900 | |
| 901 | Point3F explosionPos = getPosition(); |
| 902 | |
| 903 | Explosion* pExplosion = new Explosion; |
| 904 | pExplosion->setSubstitutionData(ss_object, ss_index); |
| 905 | pExplosion->onNewDataBlock(mDataBlock->explosion->cloneAndPerformSubstitutions(ss_object, ss_index), false); |
| 906 | |
| 907 | MatrixF trans( true ); |
| 908 | trans.setPosition( getPosition() ); |
| 909 | |
| 910 | pExplosion->setTransform( trans ); |
| 911 | pExplosion->setInitialState( explosionPos, VectorF(0,0,1), 1); |
| 912 | if (!pExplosion->registerObject()) |
| 913 | delete pExplosion; |
| 914 | } |
| 915 | |
| 916 | void Debris::computeNewState( Point3F &newPos, Point3F &newVel, F32 dt ) |
| 917 | { |
nothing calls this directly
no test coverage detected