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

Method readVector

Engine/source/core/stream/bitStream.cpp:432–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432void BitStream::readVector( Point3F *outVec, F32 maxMag, S32 magBits, S32 normalBits )
433{
434 // Nothing more to do if we got a zero length vector.
435 if ( !readFlag() )
436 {
437 outVec->set(0,0,0);
438 return;
439 }
440
441 // Read the compressed or uncompressed magnitude.
442 F32 mag;
443 if ( readFlag() )
444 mag = readFloat( magBits ) * maxMag;
445 else
446 read( &mag );
447
448 // Finally read the normal and reconstruct the vector.
449 readNormalVector( outVec, normalBits );
450 *outVec *= mag;
451}
452
453void BitStream::writeAffineTransform(const MatrixF& matrix)
454{

Callers 2

unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80

Calls 2

readFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected