MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / unpackData

Method unpackData

Engine/source/T3D/rigidShape.cpp:416–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void RigidShapeData::unpackData(BitStream* stream)
417{
418 Parent::unpackData(stream);
419
420 stream->read(&body.restitution);
421 stream->read(&body.friction);
422
423 for( U32 i = 0; i < Body::MaxSounds; i++)
424 sfxRead( stream, &body.sound[ i ] );
425
426 stream->read(&minImpactSpeed);
427 stream->read(&softImpactSpeed);
428 stream->read(&hardImpactSpeed);
429 stream->read(&minRollSpeed);
430
431 stream->read(&maxDrag);
432 stream->read(&minDrag);
433 stream->read(&integration);
434 stream->read(&collisionTol);
435 stream->read(&contactTol);
436 mathRead(*stream,&massCenter);
437 mathRead(*stream,&massBox);
438
439 cameraRoll = stream->readFlag();
440 stream->read(&cameraLag);
441 stream->read(&cameraDecay);
442 stream->read(&cameraOffset);
443
444 stream->read( &dustHeight );
445
446 stream->read(&exitSplashSoundVel);
447 stream->read(&softSplashSoundVel);
448 stream->read(&medSplashSoundVel);
449 stream->read(&hardSplashSoundVel);
450
451 // write the water sound profiles
452 for( U32 i = 0; i < MaxSounds; ++ i )
453 sfxRead( stream, &waterSound[ i ] );
454
455 if( stream->readFlag() )
456 dustID = (S32) stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
457
458 for( U32 i = 0; i < VC_NUM_SPLASH_EMITTERS; ++ i )
459 {
460 if( stream->readFlag() )
461 splashEmitterIDList[i] = stream->readRangedU32( DataBlockObjectIdFirst, DataBlockObjectIdLast );
462 }
463
464 stream->read(&splashFreqMod);
465 stream->read(&splashVelEpsilon);
466
467 stream->read(&dragForce);
468 stream->read(&vertFactor);
469
470 if( stream->readFlag() )
471 dustTrailID = (S32) stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
472}
473

Callers

nothing calls this directly

Calls 5

sfxReadFunction · 0.85
mathReadFunction · 0.85
readFlagMethod · 0.80
readRangedU32Method · 0.80
readMethod · 0.45

Tested by

no test coverage detected